63 template<
size_t Extent>
64 Encoder(std::span<const uint8_t, Extent> _data)
65 : data(_data), runLength(findRunLength()) { }
67 template<
size_t Extent>
68 Encoder(std::span<uint8_t, Extent> span)
70 reinterpret_cast<const uint8_t *
>(span.data()),
75 Encoder begin()
const {
return *
this; }
76 std::nullptr_t end()
const {
return {}; }
79 using difference_type = ptrdiff_t;
80 using value_type = uint8_t;
82 value_type operator*()
const;
83 Encoder & operator++();
84 Encoder operator++(
int) {
return ++*
this; }
85 bool operator!=(std::nullptr_t)
const;
96 uint8_t findRunLength();
98 std::span<const uint8_t> data;
101 uint8_t runIndex = 0;
102 bool runHeaderOutput =
false;