rehex icon indicating copy to clipboard operation
rehex copied to clipboard

Decompression tool

Open solemnwarning opened this issue 4 years ago • 3 comments

Decompresses a range of bytes - either to a new buffer, or to a file on disk, or perhaps substitute in the file?

solemnwarning avatar Mar 12 '22 00:03 solemnwarning

I'm assuming this will be done per Lua or some other mechanism allowing users to implement support for other compression types besides what Rehex might support? Also give me a poke and I can give you a list of compression schemes it can probably support out the gate based on the most common ones I've stumbled upon.

hogsy avatar Nov 03 '25 12:11 hogsy

Probably not - do many people write decompressors in pure Lua?

Which algorithms do you think are common?

solemnwarning avatar Nov 03 '25 23:11 solemnwarning

do many people write decompressors in pure Lua?

My thought is more along the lines of in the context of reverse-engineering, you're likely going to need to deal with custom compression schemes. If there's some way to extend that support, that would probably be pretty helpful.

As for which ones are more common, these are the formats a library of mine currently supports and these seem to cover 90% of cases.

  • DEFLATE
  • GZIP
  • IMPLODE
  • LZRW1

Deflate and "GZip" you can just support with something like miniz. Implode can be supported per blast.c which is under a BSD/MIT-style license iirc. And I think the LZRW1 impl. is public-domain. Going by memory here though... But those could be some good ones to start out with.

But again, some developers have their own schemes.

hogsy avatar Nov 04 '25 08:11 hogsy