Added string and bytes formatting
+ String fields are always null terminated and have a max length + Byte fields are made of raw bytes, and read data until they hit a max length or the end of data is reached
This commit is contained in:
4 files changed
+80
-3
No files matched your search
@@ -72,6 +72,10 @@ impl ByteStream {
|
||||
|
||||
Ok(byte_stream)
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.data.len()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&[u8]> for ByteStream {
|
||||
|
||||
Reference in new issue
Block a user