MCPcopy
hub / github.com/facebookresearch/encodec / flush

Method flush

encodec/binary.py:81–88  ·  view source on GitHub ↗

Flushes the remaining partial uint8, call this at the end of the stream to encode.

(self)

Source from the content-addressed store, hash-verified

79 self.fo.write(bytes([lower_8bits]))
80
81 def flush(self):
82 """Flushes the remaining partial uint8, call this at the end
83 of the stream to encode."""
84 if self._current_bits:
85 self.fo.write(bytes([self._current_value]))
86 self._current_value = 0
87 self._current_bits = 0
88 self.fo.flush()
89
90
91class BitUnpacker:

Callers 3

compress_to_fileFunction · 0.95
testFunction · 0.95
write_ecdc_headerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected