tree_magic
tree_magic copied to clipboard
Using from_u8/match_u8 with data pulled from streams
The case, when file data pulled from stream, requires little different API because we don't sure that we have enough data.
I think from_u8() and match_u8() should return Option<_> where None means "not enough data to determine".
As alternative solution I would like to have a way to know how much data actually required to match or detect type.