kyz/libmspack

Decompress CAB file from memory buffer

davispuh opened this issue · 2 comments

If I have CAB files as char* buffer then sadly looks like I need to write it to disk first before I can decompress and use it...

kyz commented

You can unpack CAB files from and to memory, all you need is an mspack_system that reads/writes memory.

As mentioned in the libmspack README, there are two relevant example programs:

  • cabd_memory - An mspack_system implementation that reads/writes to memory.
  • multifh - An mspack_system implementation that can simultaneously work on in-memory images, raw file descriptors, open file handles and regular disk files.

Oh, I see, that's nice, thanks! :) only looks like I've to implement that mspack_system myself (I guess could just directly copy from there) so I think it would be handy if they were already part of builtin library.