GithubHelp home page GithubHelp logo

blosc.jl's Introduction

The Blosc Module for Julia

Build Status Build status Coverage Status

This module provides fast lossless compression for the Julia language by interfacing the Blosc Library.

Note that Blosc is currently limited to 32-bit buffer sizes. Blosc does run just fine on 64-bit systems; it just can't compress arrays bigger than 2GB. Note also that this limitation does not affect the use of Blosc compression for HDF5, since HDF5 breaks up large arrays into small chunks before compressing them. So, don't worry about this if you are just using Blosc within the HDF5 package.

Installation

To install, simply run Pkg.add("Blosc") in Julia. Precompiled binaries are provided for Mac and Windows systems, while on other systems the Blosc library will be downloaded and compiled.

Usage

The functions provided are:

  • compress(src::Array{T}; level=5, shuffle=true, itemsize=sizeof(T)): returns a Vector{UInt8} consisting of src in compressed form. level is the compression level (between 0=no compression and 9=max), shuffle indicates whether to use Blosc's shuffling preconditioner, which is optimized for arrays of binary items of size itemsize.

  • compress!(dest::Vector{UInt8}, src; ...): as compress, but uses a pre-allocated destination buffer dest. Returns the size (in bytes) of the compressed data, or 0 if the buffer was too small.

  • decompress(T::Type, src::Vector{UInt8}): return the compressed buffer src as an array of element type T.

  • decompress!(dest::Vector{T}, src::Vector{UInt8}): like decompress, but uses a pre-allocated destination buffer, which is resized as needed to store the decompressed data.

  • Blosc.set_num_threads(n=CPU_CORES): tells Blosc to use n threads (initially 1).

  • Blosc.compressors(): returns an array of strings for the available compression algorithms. (Currently, only the blosclz algorithm is included.)

  • Blosc.set_compressor(s::String): set the current compression algorithm

Author

This module was written by Steven G. Johnson and Jake Bolewski (who had independently written his own Blosc.jl package which is now merged with this one).

blosc.jl's People

Contributors

eschnett avatar jakebolewski avatar nkottary avatar simonster avatar stevengj avatar tkelman avatar yuyichao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.