datrs / bitfield-rle

A run-length-encoder that compresses bitfields.
https://docs.rs/bitfield-rle
Apache License 2.0
9 stars 6 forks source link

Implement decode and fix a bug in decode_len #8

Closed theorangepotato closed 4 years ago

theorangepotato commented 5 years ago

Choose one: 🙋 feature

Checklist

Context

Semver Changes

Should probably bump to 0.1.0, given that this adds features.

theorangepotato commented 5 years ago

The README says that bitfield_rle::encode() should take a sparse_bitfield::Bitfield. Is it also desirable for bitfield_rle::decode() to output a sparse_bitfield::Bitfield? I don't think the modification would be very hard, but might limit interoperability.

khernyo commented 4 years ago

Thanks for this PR, it's great!

The README says that bitfield_rle::encode() should take a sparse_bitfield::Bitfield. Is it also desirable for bitfield_rle::decode() to output a sparse_bitfield::Bitfield? I don't think the modification would be very hard, but might limit interoperability.

I don't really have an opinion about this as I'm not familiar with its usage. I wouldn't change it just because the README says it has a different API, but if it helps somewhere, sure go ahead and change it.