• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JuliaIO/Blosc.jl: Blosc compression for the Julia language

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

JuliaIO/Blosc.jl

开源软件地址:

https://github.com/JuliaIO/Blosc.jl

开源编程语言:

Julia 100.0%

开源软件介绍:

The Blosc Module for Julia

Build Status Build 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. (The blosclz compressor is the default.)

  • Blosc.set_compressor(s::AbstractString): 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).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap