tree_magic icon indicating copy to clipboard operation
tree_magic copied to clipboard

Using from_u8/match_u8 with data pulled from streams

Open katyo opened this issue 7 years ago • 1 comments

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".

katyo avatar Nov 16 '18 09:11 katyo

As alternative solution I would like to have a way to know how much data actually required to match or detect type.

katyo avatar Nov 16 '18 09:11 katyo