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:
joeyahines committed 2021-10-09 10:05:32 -06:00
1 parent 652682cb19
commit 4e9f4bff1d
4 files changed
+80 -3

No files matched your search

+4
View File
@@ -72,6 +72,10 @@ impl ByteStream {
Ok(byte_stream)
}
pub fn len(&self) -> usize {
self.data.len()
}
}
impl From<&[u8]> for ByteStream {