home *** CD-ROM | disk | FTP | other *** search
/ News-Disk 5 / News_Disk_Issue_05_19xx___BASIC.atr / compress.doc < prev    next >
Text File  |  2023-02-26  |  1KB  |  1 lines

  1. This article was taken from the newsnet system. It contains a few ideas for compressing data. Tidied by Dean Garraghty.¢-----------------------------------¢¢From: swoodwar@zeus.calpoly.edu (Null Cypher)¢¢moon!cyberden!phbill@well.sf.ca.us had the unmitigated audacity to say:¢>¢> [Asking about compression]¢>¢>Bill¢¢I don't know how all those ARC things go (Crunch, Pack, Squeeze, Stomp, etc), but here are a couple ideas.¢¢If you have data with a lot of repeated bytes (like zero) you can do something like this:¢¢Text string "       Boooo!"¢¢Data:¢  6 spaces     .byte 6,32¢  1 B          .byte 0,1,"B"¢               (0 = no packing, 1 =¢               length, "B" = data)¢  4 o          .byte 4,'o¢  1 !          .byte 0,1,"!"                       (see "B" above)¢¢I believe one of the ARC compaction formats works something like that, but it's probably structured differently.¢¢¢Also if you have something like ASCII text, it will only use 7 of 8 bits, so if you squash the bits together and have a 12.5% reduction. ¢¢If I were you I'd set up some test files with lots of repeated sequences, ARC them, and see what the ARCs look like. Or maybe check out a library book on compaction. Or wait for a post from someone who knows what s/he is talking about...¢¢¢