vampirefrog / streamlib

Data stream library for reading and writing files, memory blocks and zipped files, with memory mapping support
0 stars 0 forks source link
close gzip libz libzip mmap munmap open read rewind seek stdio stream write

StreamLib

Linux Build MSYS2 MINGW64 Build

Streaming I/O for stdio, memory blocks and files in zip archives. Supports memory mapping where available, and transparent gzip decompression.

module gzip open read write seek eof tell mmap munmap close
mem R no
R yes ☑️ ☑️ ☑️³ ☑️ ☑️ ☑️² ☑️² ☑️
W no ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️
W yes ☑️ ☑️ ☑️¹ ☑️ ☑️
RW no ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️
RW yes
file R no ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️
R yes ☑️ ☑️ ☑️³ ☑️ ☑️ ☑️² ☑️² ☑️
W no ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️
W yes ☑️ ☑️ ☑️¹ ☑️ ☑️
RW no ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️ ☑️
RW yes
zip_file R no ☑️ ☑️ ☑️⁴ ☑️ ☑️ ☑️ ☑️ ☑️
R yes ☑️ ☑️ ☑️³ʼ⁴ ☑️ ☑️ ☑️² ☑️² ☑️
W no
W yes
RW no
RW yes
  1. Forward only
  2. Slurp into memory block
  3. Slow
  4. Uncompressed data only

Building

  1. Clone the repository:
git clone https://github.com/vampirefrog/streamlib.git
cd streamlib
  1. Compile the library:

    make HAVE_LIBZIP=1 HAVE_GZIP=1