Ruby library for writing LZOP files.
This gem writes the binary file format for .lzo
or .lz
files in native Ruby code.
The lzoruby gem is used to compress the data.
This release of lzop-file is currently not feature-complete & should be treated as a beta release!
There are known issues with the current implementation with regards to output file compatibility with the lzop
tool:
LZO_VERSION
constant directly from the external lzo library, instead it supplies the value of LZO_VERSION_STRING
. We will attempt to remain compatible with lzoruby 0.1.3 for now, and fudge the LZO_VERSION
to latest current for lzo-2.08 0x2080
. Hopefully, a future release of lzopruby will contain the real external library version ;-)Notes: This gem depends on lzoruby
which uses native C extensions, and depends on the lzo library.
As such, it has dependencies that should probably not be used on JRuby in production.
To install the LZO Library:
apt-get install liblzo2-dev
yum install lzo-devel
brew install lzo
Add this line to your application's Gemfile:
gem 'lzop-file'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lzop-file
Writing LZO Compressed files is simple:
require 'lzop-file'
uncompressed_file_data = "Hello World\n" * 100
my_test_file = LZOP::File.new( '/tmp/my_test_file.lzo' )
my_test_file.write( uncompressed_file_data )
Or to write just the header:
require 'lzop-file'
LZOP::File.new( '/tmp/my_test_file.lzo_header' ).write_header
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)