mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
use the smallest possible size int for descriminant reading/writing
This commit is contained in:
parent
2a1718b5f6
commit
eb4bafc310
4 changed files with 40 additions and 18 deletions
|
|
@ -142,7 +142,7 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
if type_bit_size < USIZE_BITS {
|
||||
if type_bit_size < USIZE_BITS || count < USIZE_BITS {
|
||||
self.push_bits(value.into_usize_unchecked(), count);
|
||||
} else {
|
||||
self.push_non_fit_bits(value.into_bytes(), count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue