nfengine icon indicating copy to clipboard operation
nfengine copied to clipboard

Add new functions to libpacker

Open lookeypl opened this issue 10 years ago • 0 comments

libpacker is missing various functions which will help us to use it with nfEngine and outside of the project:

  • Add accessing data through InputStream - read and decompress (this will be tricky) a file in-the-fly. Should allow for seeking and reading only a part of a file. This feature will be crucial for loading streaming resources (maps, music, etc.).
  • Add hash collision detection.
  • Add compression for every file (let this be your algorithm of choice). There should be few built-in alogirithms (deflate, LZMA, etc.), but the packer design must be flexible. Each file is compressed independently.
  • Eventually add compression/encryption to header of PAK (note that this might not be needed if header will have hashed data - see #19 .
  • Add functions to allow adding only selected files. Consider adding ignore patterns as well (maybe use glob expressions?)
  • Right now construction of archive generated by Packer depends on architecture on which nfCommon is built. In short terms - archive generated by 32-bit version of nfCommon will differ from archive generated by 64-bit version (mostly due to different definition of size_t type). Check if this can be avoided without raising compilation warnings. Alternatively, try to hide version information in archives header and check it during NFE::Common::packReader initialization.

lookeypl avatar Aug 15 '14 07:08 lookeypl