Lines Matching refs:data
8 container formats, as well as raw compressed data streams.
45 Note that LZMAFile provides a *binary* file interface - data read
46 is returned as bytes, and data to be written must be given as bytes.
183 """Return buffered data without advancing the file position.
185 Always returns at least one byte of data, unless at EOF.
205 buffer's worth of data if size is negative.
224 def write(self, data):
228 always the length of data in bytes. Note that due to buffering,
229 the file on disk may not reflect the data written until close()
233 if isinstance(data, (bytes, bytearray)):
234 length = len(data)
236 # accept any data that supports the buffer protocol
237 data = memoryview(data)
238 length = data.nbytes
240 compressed = self._compressor.compress(data)
319 def compress(data, format=FORMAT_XZ, check=-1, preset=None, filters=None):
320 """Compress a block of data.
328 return comp.compress(data) + comp.flush()
331 def decompress(data, format=FORMAT_AUTO, memlimit=None, filters=None):
332 """Decompress a block of data.
343 res = decomp.decompress(data)
346 break # Leftover data is not a valid LZMA/XZ stream; ignore it.
351 raise LZMAError("Compressed data ended before the "
353 data = decomp.unused_data
354 if not data: