1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 16:44:06 +02:00
Commit graph

267 commits

Author SHA1 Message Date
Nikita Strygin
b74c46afca Add #[align] to docs 2023-02-06 16:02:46 +03:00
Nikita Strygin
e33aa2f776 Add #[align] attribute to structs
This attribute aligns the reader to byte boundary

It can be applied to enums & structs to align before reading any fields or the discriminant

It can also be applied to individual struct fields to align the reader before reading the field

Finally, you can apply it to non-unit enum variants to align the reader after reading the discriminant, but before reading the payload
2023-02-06 15:49:33 +03:00
Nikita Strygin
35e2a42219 Add align function to BitReadStream and BitWriteStream 2023-02-06 15:00:27 +03:00
8bc758c237 fix reading bool from sub-stream causing position to get out of sub-stream bounds 2022-12-13 14:19:50 +01:00
587d4ac8ef 0.10.8 2022-08-06 16:00:07 +02:00
8066984763 fix Utf8Error::length going out of bounds of sub-buffers 2022-08-06 15:58:12 +02:00
9a4b300875 flake 2022-08-06 15:27:15 +02:00
96c37a0bc3 0.10.7 2022-05-01 15:48:40 +02:00
b096c70061 allow creating a writestream from a slice 2022-05-01 15:39:41 +02:00
f6fb6c6f64 0.10.6 2022-05-01 14:56:27 +02:00
df4a9b32ac fmt: 2022-05-01 14:50:48 +02:00
5e9f0e7a59
Merge pull request #5 from jbangelo/fix-unchecked-bool-endianness
Fix unchecked reading boolean values
2022-05-01 12:50:17 +00:00
Joseph Angelo
1e575b8efc Check endianess when unconditionally reading boolean values 2022-04-30 08:47:38 -07:00
4a3d5820f8 0.10.5 2022-04-09 18:45:29 +02:00
b335f9cfad 0.10.4 2022-04-09 18:41:55 +02:00
bd7a4fca5b clippy fixes 2022-04-09 18:41:39 +02:00
bc5d74038e intoiter 2022-04-09 18:35:35 +02:00
5008cae35d write for Cow 2022-04-09 18:33:39 +02:00
bf27c72389 larger non fit chunks 2021-07-27 18:22:38 +02:00
9d04fbe7cf miri being difficult on purpose to ensure we dont take shortcuts 2021-07-27 17:10:52 +02:00
ed249331e1 unalligned fallback 2021-07-27 16:59:58 +02:00
4557a5babb bool write optimizations 2021-07-27 16:44:41 +02:00
f09b56b36a some 32bit optimizations 2021-07-27 15:52:47 +02:00
0fe7c04ece type hints in tests 2021-07-27 15:12:42 +02:00
6a74d8894e add optional schema 2021-07-25 22:31:46 +02:00
9c3d98dc62 cleanup serde 2021-07-25 14:25:56 +02:00
5ee1a124ce test with all features 2021-07-25 14:14:52 +02:00
d08f92e11b basic serde support 2021-07-25 14:06:15 +02:00
cefc9c3500 0.10.1 2021-07-24 19:15:32 +02:00
33ea27fd67 simplify float handling 2021-07-24 19:10:37 +02:00
9aba4351ac optimize aligned floats 2021-07-24 18:50:19 +02:00
eb4bafc310 use the smallest possible size int for descriminant reading/writing 2021-07-24 17:34:29 +02:00
2a1718b5f6 remove full reserve
this makes code a lot simpler
2021-07-24 16:25:25 +02:00
75e50b6707 implement reserve_size with reserve_int 2021-07-24 16:09:48 +02:00
227582cbc4 add reserve_int 2021-07-24 16:04:17 +02:00
c321c5a252 bitwrite for options 2021-07-24 14:53:59 +02:00
5d7dbe35ee partialeq for LazyBitRead 2021-07-20 23:20:26 +02:00
9e0fa4df0b more empty write fixes 2021-07-20 15:38:54 +02:00
716d32fecb flexible error types for reserve 2021-07-20 14:53:05 +02:00
973f543e1b 0.9.7 2021-07-20 13:55:57 +02:00
e7617dea76 expose 'reserve' 2021-07-20 13:54:07 +02:00
39e0f528fb fix pushing 0 bits 2021-07-19 18:53:08 +02:00
6042fd5426 fix writing small bit streams 2021-07-19 17:57:36 +02:00
68fab5f3e8 fix reserve when more then one byte needs to be merged 2021-07-19 17:27:08 +02:00
a87f75588f 0.9.6 2021-07-19 15:23:35 +02:00
51d43bbcf6 fix reserve when bit offset is large 2021-07-19 15:21:00 +02:00
60563afc7a unbreak int and float 2021-07-19 15:20:23 +02:00
5bd8313a51 minor read bool improvement 2021-07-18 20:04:26 +02:00
94bc320add move benches to iai 2021-07-18 19:55:45 +02:00
c090180a14 add reserve_byte_length 2021-07-18 16:37:35 +02:00