All Projects → jibsen → Tinf

jibsen / Tinf

Licence: zlib
Tiny inflate library (inflate, gzip, zlib)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Tinf

power-gzip
POWER9 gzip engine documentation and code samples
Stars: ✭ 16 (-71.93%)
Mutual labels:  gzip, zlib, decompression
bled
Base Library for Easy Decompression
Stars: ✭ 21 (-63.16%)
Mutual labels:  gzip, decompression
deflate-rs
An implementation of a DEFLATE encoder in rust
Stars: ✭ 47 (-17.54%)
Mutual labels:  gzip, zlib
EasyCompressor
⚡ A compression library that implements many compression algorithms such as LZ4, Zstd, LZMA, Snappy, Brotli, GZip, and Deflate. It helps you to improve performance by reducing Memory Usage and Network Traffic for caching.
Stars: ✭ 167 (+192.98%)
Mutual labels:  gzip, decompression
zzlib
zlib-compressed file depacking library in Lua
Stars: ✭ 44 (-22.81%)
Mutual labels:  gzip, zlib
zlib
Pure javascript implementation of Zlib nodejs core module.The zlib module provides compression functionality implemented using Gzip and Deflate/Inflate.
Stars: ✭ 14 (-75.44%)
Mutual labels:  gzip, zlib
pyrus-cramjam
Thin Python wrapper to de/compression algorithms in Rust - lightweight & no dependencies
Stars: ✭ 40 (-29.82%)
Mutual labels:  gzip, decompression
em inflate
Fast, small, in-memory inflate (zlib, deflate and gzip decompression)
Stars: ✭ 59 (+3.51%)
Mutual labels:  gzip, zlib
decompress
Pure OCaml implementation of Zlib.
Stars: ✭ 103 (+80.7%)
Mutual labels:  zlib, decompression
Gzipswift
Swift framework that enables gzip/gunzip Data using zlib
Stars: ✭ 356 (+524.56%)
Mutual labels:  zlib, gzip
Flate2 Rs
DEFLATE, gzip, and zlib bindings for Rust
Stars: ✭ 390 (+584.21%)
Mutual labels:  zlib, gzip
Libz.jl
Fast, flexible zlib bindings.
Stars: ✭ 26 (-54.39%)
Mutual labels:  gzip, zlib
Zlib Ng
zlib replacement with optimizations for "next generation" systems.
Stars: ✭ 807 (+1315.79%)
Mutual labels:  zlib, library
zlib
Compression and decompression in the gzip and zlib formats
Stars: ✭ 32 (-43.86%)
Mutual labels:  gzip, zlib
lambdafs
Efficient (de)compression package for AWS Lambda
Stars: ✭ 24 (-57.89%)
Mutual labels:  gzip, decompression
python-isal
Faster zlib and gzip compatible compression and decompression by providing python bindings for the isa-l library.
Stars: ✭ 21 (-63.16%)
Mutual labels:  gzip, zlib
Datacompression
Swift libcompression wrapper as an extension for the Data type (GZIP, ZLIB, LZFSE, LZMA, LZ4, deflate, RFC-1950, RFC-1951, RFC-1952)
Stars: ✭ 191 (+235.09%)
Mutual labels:  zlib, gzip
Turbobench
Compression Benchmark
Stars: ✭ 211 (+270.18%)
Mutual labels:  zlib, gzip
pugz
Truly parallel gzip decompression
Stars: ✭ 96 (+68.42%)
Mutual labels:  gzip, decompression
Fflate
High performance (de)compression in an 8kB package
Stars: ✭ 547 (+859.65%)
Mutual labels:  zlib, decompression

tinf - tiny inflate library

Version 1.2.1

Copyright (c) 2003-2019 Joergen Ibsen

http://www.ibsensoftware.com/

Build Status

About

tinf is a small library implementing the decompression algorithm for the deflate compressed data format (called 'inflate'). Deflate compression is used in e.g. zlib, gzip, zip, and png.

I wrote it because I needed a small in-memory zlib decompressor for a self- extracting archive, and the zlib library added 15k to my program. The tinf code added only 2k.

Naturally the size difference is insignificant in most cases. Also, the zlib library has many more features, is well-tested, and mostly faster. But if you have a project that calls for a small and simple deflate decompressor, give it a try :-)

Usage

The include file src/tinf.h contains documentation in the form of doxygen comments.

Wrappers for decompressing zlib and gzip data in memory are supplied.

tgunzip, an example command-line gzip decompressor in C, is included.

tinf uses CMake to generate build systems. To create one for the tools on your platform, and build tinf, use something along the lines of:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

You can also simply compile the source files and link them into your project. CMake just provides an easy way to build and test across various platforms and toolsets.

Notes

tinf requires int to be at least 32-bit.

The inflate algorithm and data format are from 'DEFLATE Compressed Data Format Specification version 1.3' (RFC 1951).

The zlib data format is from 'ZLIB Compressed Data Format Specification version 3.3' (RFC 1950).

The gzip data format is from 'GZIP file format specification version 4.3' (RFC 1952).

The original version of tinf assumed it was given valid compressed data, and that there was sufficient space for the decompressed data. If code size is of the utmost importance, and you are absolutely sure you can trust the compressed data, you may want to check out tinf 1.1.0 (last release without security checks).

Ideas for future versions:

  • Memory for the tinf_data object should be passed, to avoid using more than 1k of stack space
  • Wrappers for unpacking zip archives and png images
  • Blocking of some sort, so everything does not have to be in memory
  • Optional table-based Huffman decoder

Related Projects

License

This projected is licensed under the zlib License (Zlib).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].