airlift / aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Apache License 2.0
549 stars 110 forks source link

Request: Generic Decompressor for all algos based on magic number header #202

Open gabrieljones opened 3 weeks ago

gabrieljones commented 3 weeks ago

A decompressor that can detect and handle any of the supported algorithms.

Algo Magic Number Source
ZStd 28 b5 2f fd https://en.wikipedia.org/wiki/Zstd
LZ4 04 22 4d 18 https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)
Snappy ff 06 00 00 73 4e 61 50 70 59 https://en.wikipedia.org/wiki/Snappy_(compression)
LZO ??? https://github.com/mirror/lzop/blob/master/doc/magic
GZIP 1f 8b https://en.wikipedia.org/wiki/Gzip
Deflate ??? https://en.wikipedia.org/wiki/Deflate
BZip2 BZh https://en.wikipedia.org/wiki/Bzip2