as-com / varint-simd

Decoding and encoding gigabytes of LEB128 variable-length integers per second in Rust with SIMD
https://docs.rs/varint-simd
Apache License 2.0
115 stars 10 forks source link

Return the number of bytes of the output without doing the actual encoding #8

Open cBournhonesque opened 6 months ago

cBournhonesque commented 6 months ago

Hi, There is a situation where I would like to know ahead of time how much bytes the output is going to take, without doing the actual encoding. I don't know if there's a way to compute it cheaper than by actually computing it, but it would be useful for me!