packed_struct.rs icon indicating copy to clipboard operation
packed_struct.rs copied to clipboard

Bit-level packing and unpacking for Rust

Results 32 packed_struct.rs issues
Sort by recently updated
recently updated
newest added

The Integer struct could implement the binary trait to allow usage of the `{:b}` formatter. The implementation is fairly trivial, and similar to the implementations of the Debug and Display...

If someone use something like ```rust #[derive(PackedStruct)] #[packed_struct(endian = "lsb")] pub struct Record { data: [u8; 5000], csum: u16, } ``` Macro will explode with code for `data_0, data_1..... data_5000`....

Hi, I noticed that packing nested structs fails for partial Integer types when used in inner structs. Weirdly enough, this is only applicable for bits smaller than 5. Following fields...

I've used this library for a while and it has been great, but I was wondering if something like packed enum variants would be something that could be potentially in...

Hi, Thank you for your help! I am trying to read a packed struct from file created in a CPP app. This is the original struct: `struct HeaderStruct { uint16_t...

Thanks for maintaining this great crate! I can't seem to figure out how to have a PackedStruct whose fields are `usize`. Is there any intention to support this as long...

Using a large array in a struct causes compile times to explode: ```rust use packed_struct::prelude::*; #[derive(PackedStruct)] #[packed_struct(endian = "msb")] pub struct MyStruct { x: u16, y: u16, d: [u16; 20000],...

He, I wanted to use another crate that depend on this one ([usbd-human-interface-device](https://github.com/dlkj/usbd-human-interface-device)), on my ESP32-S3 and sadly it wouldn't compile :/ The reason is that ESP32 (and probably other...

Hi, I'm wondering if we can/should do an 0.11.0 release off HEAD. In particular the syn 2.0 update is relevant to me; it fixes a bug I was encountering where...