RubyFlow The Ruby and Rails community linklog

RSmaz: Short String Compression Library

A few days ago I saw smaz, a C library by Salvatore Sanfilippo that’s great for compression short strings. RSmaz is my pure Ruby port of this library (complete with tests). If, for some reason, you want to compress short strings by 10-60%, check it out.

Comments

Don’t ask me what to use it for. I don’t really have any idea. I just saw smaz, though it was cool, and fancied a little side project :)

Why not just create a binding?

Official answer: I like to keep things cross implementation and cross platform/architecture compatible as possible, even at the cost of speed. It would be easy to use FFI to call up the smaz library if you wanted to, of course.

Real answer: I just wanted to enjoy implementing it.

I’m actually looking for a compression algorhythm optimized for text and speed. However, “short strings” doesn’t sound suitable for my specific needs on this one.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in