Add decopmressed encoding; add decompressed test cases

This commit is contained in:
Bottersnike
2022-09-09 13:44:29 +01:00
committed by Jennifer Taylor
parent 036bf1ce20
commit 224ed0e2a8
4 changed files with 49 additions and 5 deletions

View File

@@ -128,6 +128,20 @@ class OutputStream:
self.__formatted_data = b''.join(self.__data)
return self.__formatted_data
def write_blob(self, blob: bytes) -> int:
"""
Write a binary blob of data to the stream
Parameters:
blob - An blob of data to write.
Returns:
the number of bytes written
"""
self.__data.append(blob)
self.__data_len += len(blob)
return len(blob)
def write_byte(self, byte: bytes) -> None:
"""
Write a raw byte to the end of the output stream.