Skip to content

Overhaul LZH code

Deucе requested to merge lzh-refactor into master
  • Rename variables and macros to be more readable.
  • Split encoding and decoding variables into separate structs so they don't all need to be on the stack
  • Stop using signed values for anything This also stops depending on left-shifting into the sign bit "working" as expected... something compilers can optimize out
  • Use size-based types instead of short/long
  • Make the encoded buffer endian-agnostic (convert to little-endian)
  • Clean up lzh_update() a bit
  • Enable long-disabled overflow checks
  • Accept a size_t buffer size argument to encode/decode

Merge request reports

Loading