gziprb - Gzip implemented in Ruby
Over the last few months, I have created
gziprb, a pure-Ruby
implementation of the famous GZIP/DEFLATE format. It is (definitely!)
not optimised for performance, but was instead created as a learning exercise
to try and understand the gzip format. It was certainly interesting to
understand the bit-packing, storage-optimisation and low-level deflate
algorithm that go together to create gzip.
We can run some very simple tests to make sure the basics are working (the project specs contain many more-involved examples than this!).
> echo 'ABCabcabcXYZ11111ABC' | bundle exec exe/gziprb | gunzip ABCabcabcXYZ11111ABC
> echo 'ABCabcabcXYZ11111ABC' | gzip | bundle exec exe/gunziprb ABCabcabcXYZ11111ABC
Please take a look and maybe give
gziprb a try!