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

dcjones/Zlib.jl: zlib bindings for Julia

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

开源软件名称:

dcjones/Zlib.jl

开源软件地址:

https://github.com/dcjones/Zlib.jl

开源编程语言:

Julia 100.0%

开源软件介绍:

Zlib

Zlib bindings for Julia.

Note: This library is currently maintained, but should be considered deprecated in favor of Libz.jl, which is in every way better.

This library provides a compress and decompress function that work as follows.

Basic API

# Compress data, ouputting a Vector{UInt8} where data is either a Vector{UInt8}
# or an AbstractString.
compress(data)

# Compress at a particular level in [1, 9]
compress("Hello world", 5)

# Decompress to a Vector{UInt8} where data is either a Vector{UInt8} or an
# AbstractString.
decompress(data)

Stream API

Incremental compression or decompression can be performed with the Reader and Writer types which both derive IO, and can be used with most functions that operate on streams.

Reader(io::IO, raw::Bool=false, bufsize::Int=4096)
  • io source from which compressed data should be read
  • raw true if the data is in the raw deflate format.
  • bufsize how much input data to operate on at a time
Writer(io::IO, level::Integer, gzip::Bool=false, raw::Bool=false)
  • io source to which compressed data should be written
  • level compression level in [1,9]
  • gzip true if output should be in the gzip format
  • raw true if output is in the raw deflate format.

crc32

crc32(data::Vector{UInt8}, crc::Integer=0) crc32(data::AbstractString, crc::Integer=0)

Compute and return the 32-bit cycle redundancy check on data, updating a running value crc.

# E.g.
crc32("hello")
0x3610a686



鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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