Code Comments
Programming Forum and web based access to our favorite programming groups.I was thinking of using a sort algorithm for compression. Are their any compression programs with sort algorithms? The compression program will describe the sort path. after this it wil use something like RLE or huffman. Wil it work? *-----------------------* Posted at: www.GroupSrv.com *-----------------------*
Post Follow-up to this messageOn 11 Oct 2004, gigaflops wrote: > I was thinking of using a sort algorithm for compression. > Are their any compression programs with sort algorithms? > > The compression program will describe the sort path. > after this it wil use something like RLE or huffman. > > Will it work? It depends on your sorting algorithm and how much overhead you need to store the "sort path". If you do a plain quick sort of bytes store some overhead to identify the permutation and code the sorted bvtes via RLE or DPCM this won't help you in terms of compression. A more advanced approach is the BWT transform. Thething about the BWT is: you don't need much overhead to store the permutation. It does not sort all bytes correctly but it usually creates long runs of the same bytes if there's strong interrelationship between bytes (like in english text for example). No need to store a "sort path" since this transform is reversible with _really_ small amount of control data. Google for BWT (Burrow Wheeler Transform) (The BWT is used in BZIP2 for example) HTH, Sebastian -- PGP-Key-ID (long): 572B1778A4CA0707
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.