1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 08:34:07 +02:00

add reserve_int

This commit is contained in:
Robin Appelman 2021-07-24 16:04:17 +02:00
commit 227582cbc4
3 changed files with 35 additions and 1 deletions

15
benches/write.rs Normal file
View file

@ -0,0 +1,15 @@
use bitbuffer::{BitWriteStream, LittleEndian};
use iai::black_box;
fn write_int_le() {
let mut out = Vec::with_capacity(128);
{
let mut write = BitWriteStream::new(&mut out, LittleEndian);
for i in 0..128 {
write.write_sized(&black_box(i), 7).unwrap();
}
}
black_box(out);
}
iai::main!(write_int_le);