jtmoon79 / super-speedy-syslog-searcher

Speedily search and merge log messages by datetime
MIT License
31 stars 1 forks source link

Support processing LZMA and LZMA2 format `.lz` files #128

Open jtmoon79 opened 1 year ago

jtmoon79 commented 1 year ago

Summary

File of type .lz are not processed. An .lz file is:

A file with .lzma extension is a compressed archive file created using the LZMA (Lempel-Ziv-Markov chain Algorithm) compression method.

Current behavior

A file log.lz would attempt to be parsed as a syslog file. Seeing no text, processing would stop (except in case of errant parsing, Issue #122).

Suggested behavior

Process .lz files as compressed files. The crate lzma-rs is already used to process .xz files.

Ideally, this would be a fair amount of work but should be straight-forward.

Other considerations

LZMA is considered a legacy format so this is low priority. However, there is also LZMA2 format. I have never encountered either, so I suspect they are very rare, if not totally deprecated in favor of XZ format.

Note that .lz named files may be many varying types of formats; LZMA, LZMA2, LZMA4, LZMA within XZ container. This adds more work to determing the precise type.

jtmoon79 commented 1 year ago

Relates to #12

jtmoon79 commented 2 months ago

Make sure to use lzma program, part of XZ Utils. There are many lz* programs that will compress files. And there are also many many LZMA standardized formats.

Only program lzma appears to write LZMA format 1, the oldest format.

$ lzma -z9kv -c file > file.lz