All Projects → BioJulia → Libz.jl

BioJulia / Libz.jl

Licence: other
Fast, flexible zlib bindings.

Programming Languages

julia
2034 projects

Labels

Projects that are alternatives of or similar to Libz.jl

Uzlib
Radically unbloated DEFLATE/zlib/gzip compression/decompression library. Can decompress any gzip/zlib data, and offers simplified compressor which produces gzip-compatible output, while requiring much less resources (and providing less compression ratio of course).
Stars: ✭ 168 (+546.15%)
Mutual labels:  gzip, zlib
em inflate
Fast, small, in-memory inflate (zlib, deflate and gzip decompression)
Stars: ✭ 59 (+126.92%)
Mutual labels:  gzip, zlib
deflate-rs
An implementation of a DEFLATE encoder in rust
Stars: ✭ 47 (+80.77%)
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 (-46.15%)
Mutual labels:  gzip, zlib
Denoflate
WebAssembly powered Deflate/Gzip/Zlib compression for Deno, written in Rust
Stars: ✭ 80 (+207.69%)
Mutual labels:  gzip, zlib
zlib
Compression and decompression in the gzip and zlib formats
Stars: ✭ 32 (+23.08%)
Mutual labels:  gzip, zlib
Gzipswift
Swift framework that enables gzip/gunzip Data using zlib
Stars: ✭ 356 (+1269.23%)
Mutual labels:  gzip, zlib
python-isal
Faster zlib and gzip compatible compression and decompression by providing python bindings for the isa-l library.
Stars: ✭ 21 (-19.23%)
Mutual labels:  gzip, zlib
Universal Zopfli Js
JavaScript binding to Zopfli with WebAssembly.
Stars: ✭ 70 (+169.23%)
Mutual labels:  gzip, zlib
Tinf
Tiny inflate library (inflate, gzip, zlib)
Stars: ✭ 57 (+119.23%)
Mutual labels:  gzip, zlib
Turbobench
Compression Benchmark
Stars: ✭ 211 (+711.54%)
Mutual labels:  gzip, zlib
Swcompression
A Swift framework for working with compression, archives and containers.
Stars: ✭ 110 (+323.08%)
Mutual labels:  gzip, zlib
power-gzip
POWER9 gzip engine documentation and code samples
Stars: ✭ 16 (-38.46%)
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 (+634.62%)
Mutual labels:  gzip, zlib
zzlib
zlib-compressed file depacking library in Lua
Stars: ✭ 44 (+69.23%)
Mutual labels:  gzip, zlib
Flate2 Rs
DEFLATE, gzip, and zlib bindings for Rust
Stars: ✭ 390 (+1400%)
Mutual labels:  gzip, zlib
Zippy
Pure Nim implementation of deflate, zlib, gzip and zip.
Stars: ✭ 88 (+238.46%)
Mutual labels:  gzip, zlib
Libflate
A Rust implementation of DEFLATE algorithm and related formats (ZLIB, GZIP)
Stars: ✭ 125 (+380.77%)
Mutual labels:  gzip, zlib
gzip-loader
[DEPRECATED] gzip loader module for webpack
Stars: ✭ 15 (-42.31%)
Mutual labels:  gzip
Vue Cli4 Config
vue-cli4配置vue.config.js持续更新
Stars: ✭ 2,539 (+9665.38%)
Mutual labels:  gzip

Build Status Build status codecov.io

NOTE: If you are starting a new project on Julia 0.6 or later, it is recommended to use the CodecZlib.jl package instead. CodecZlib.jl and other packages offer more unified interfaces for a wide range of file formats.

This is yet another zlib interface for Julia. It's intended to replace the two prior zlib packages.

Both have shortcomings that this package aims to address, specifically:

  • Zlib.jl is very slow.
  • GZip.jl is not as slow as Zlib.jl, but still slower than it could to be.
  • GZip.jl only supports file I/O.
  • GZip.jl doesn't support reading/writing plain zlib data.

API

This library exports four stream types:

Type Description
ZlibInflateOutputStream write and decompress data
ZlibDeflateOutputStream write and compress data
ZlibInflateInputStream read and decompress data
ZlibDeflateInputStream read and compress data

These work like regular IO objects. Each takes as a parameter either in input or output source.

Examples

# read lines from a compressed file
for line in eachline(open("data.txt.gz") |> ZlibInflateInputStream)
    # do something...
end

# write compressed data to a file
io = open("data.txt.gz", "w")
stream = ZlibDeflateOutputStream(io)
for c in rand(UInt8, 10000)
    write(stream, c)
end
close(stream)  # this closes not only `stream` but also `io`

# pointlessly compress and decompress some data (use `read` on v0.5)
readbytes(rand(UInt8, 10000) |> ZlibDeflateInputStream |> ZlibInflateInputStream)

Other functions

There are convenience Libz.inflate(::Vector{UInt8}) and Libz.deflate(::Vector{UInt8}) functions that take a byte array and return another compressed or decompressed byte array.

Checksum functions are exposed as Libz.crc32(::Vector{UInt8}) and Libz.adler32(::Vector{UInt8}).

See BufferedStreams.jl for benchmarks of this library.

Low-level APIs are defined in src/lowlevel.jl. These constants and functions are not exported but available if necessary. At the moment, function wrappers are minimal but feel free to add and send functions you need as pull requests.

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].