https://github.com/hmsk/lzfx
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hmsk/lzfx
- Owner: hmsk
- Created: 2012-05-02T20:34:05.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-02T20:39:56.000Z (about 13 years ago)
- Last Synced: 2025-04-02T21:09:50.948Z (2 months ago)
- Language: Ruby
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby bindings for lzfx
lzfx is a tiny, extremely fast compression library.
## lzfx
this gem contains lzfx.* http://code.google.com/p/lzfx/
> LZFX is a small (one C file, 200 non-comment lines) BSD-licensed library designed for very-high-speed compression of redundant data. It is descended from liblzf and is 100% compatible with existing LZF-compressed data.
> LZFX was originally developed as a component of the h5py project, which uses an LZF-based compressor to process scientific data.
## Example
```ruby
require 'rubygems'
require 'lzfx'a = "aaaaaaaaabbbbbbbbbbbbabababaccccccccccjshabbbbbbaaa"
puts "source: #{a}"
puts "source size: #{a.size}"b = Lzfx.compress a
puts "compressed: #{b}"
puts "compressed size: #{b.size}"c = Lzfx.decompress b
puts "decompressed: #{c}"
puts "decompressed size: #{c.size}"
puts "source == decompressed: #{a == c}"
```## Copyright
Copyright: (C) 2012 Kengo HAMASAKI