Show HN: XPress Compress v1.0 – A config-less compression algorithm
github.com
github.com
I don't understand this. For any archive format in modern use, it doesn't matter what version, os, or architecture was used to compress the file. I can decompress a zip or lha file created on an Amiga 500 no problem, 30 years after the fact. Is there something I'm missing?
The zip header is a required part of the archive, and without it the rest of the data could be lost forever. .xpr archives have no header and (currently) no offsets. The compression settings can be inferred from the data inside the archive itself, making headers that describe the data unnecessary.
And while it's true that you can decompress old archives with new hardware, you can't always decompress a new archive on outdated software. Sometimes even with up-to-date software it's possible to sometimes create an archive with 7z on Linux that WinRar on Windows will not be able to open.
https://docs.microsoft.com/en-us/openspecs/windows_protocols...
LZW is not a good compression algorithm in this day and age. Why was this chosen?
I made this to learn about compression. Partly to see if it was possible and partly to learn more about what makes compression work. I wasn't specifically trying to "beat" anything currently on the market. Just learn and see if there's any potential here.
I don't understand this. Can you show an example where an XPress compressed file is better in terms of portability than a ZIP file?
For example, check out this cheat sheet... (http://kb.winzip.com/kb/entry/313/)
None of that data goes into an .xpr archive. So there's no ambiguity between different clients about how to compress or extract a file. There is only one way to decompress ANY .xpr archive; to search the file for instances of the dictIndex and replace them with the corresponding data. When you run out of matches; your file is rebuilt.
Options shouldn't be order dependant like that.
Have you got any comparisons to other algorithms
I eventually want to put that code into a loop. That will probably come at the same time as relative path support.
Just know that I'm not proud of argument handling in its current form and improvements are on my radar.
Good on you for releasing it though.
I would seriously look at using a library rather than rolling your own. Sorting all the edge cases is a pain, they can automate help messages etc, gnu style long options etc. Unless of course you want to delve into the weeds of option parsing.