Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ac407f0b72
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.558 kb
require 'rspec'
require 'libsnappy'
describe Snappy do
it 'should compress data' do
lambda do
Snappy.compress('abcdefg')
end.should_not raise_error
end
it 'should uncompress data' do
lambda do
Snappy.uncompress(Snappy.compress('abcdefg'))
end.should_not raise_error
end
it 'should roundtrip the data' do
original = 'abcdefg' * 100
compressed = Snappy.compress(original)
uncompressed = Snappy.uncompress(compressed)
original.should == uncompressed
compressed.size.should < original.size
end
end
Jump to Line
Something went wrong with that request. Please try again.