2 Checks for naive byte counts
5 The [`bytecount`](https://crates.io/crates/bytecount)
6 crate has methods to count your bytes faster, especially for large slices.
9 If you have predominantly small slices, the
10 `bytecount::count(..)` method may actually be slower. However, if you can
11 ensure that less than 2³²-1 matches arise, the `naive_count_32(..)` can be
12 faster in those cases.
16 let count = vec.iter().filter(|x| **x == 0u8).count();
21 let count = bytecount::count(&vec, 0u8);