ouster.sdk.pcap.packet_iter module
- ichunked_before(it, pred)[source]
Return the given stream chunked by the predicate.
Each sub-iterator will be fully consumed when the next chunk is requested. No caching of unused items is performed, so client code should evaluate sub-iterators (e.g. into lists) to avoid dropping items.
This should behave same as more_itertools.split_before, except that chunks aren’t eagerly evaluated into lists. This makes it safe to use on streams where it’s possible that
prednever evaluates to true.- Return type:
Iterator[Iterator[TypeVar(T)]]