diff --git a/disk_objectstore/utils.py b/disk_objectstore/utils.py index 83175cd3..e1228c7f 100644 --- a/disk_objectstore/utils.py +++ b/disk_objectstore/utils.py @@ -548,6 +548,12 @@ def writable() -> bool: def closed(self) -> bool: return self._fhandle.closed + def close(self) -> None: + """Close the reader. Does not close the underlying file handle since it is shared.""" + + def flush(self) -> None: + """Flush is a no-op for a read-only stream.""" + @staticmethod def seekable() -> bool: """Return whether object supports random access.""" @@ -683,6 +689,12 @@ def writable() -> bool: def closed(self) -> bool: return self._stream.closed + def close(self) -> None: + """Close the wrapper. Does not close the underlying stream.""" + + def flush(self) -> None: + """Flush is a no-op for a read-only stream.""" + def seekable(self) -> bool: """Return whether object supports random access.""" return self._stream.seekable() @@ -834,6 +846,12 @@ def closed(self) -> bool: self._lazy_uncompressed_stream is None or self._lazy_uncompressed_stream.closed ) + def close(self) -> None: + """Close the decompresser. Does not close the underlying compressed stream.""" + + def flush(self) -> None: + """Flush is a no-op for a read-only stream.""" + def read(self, size: int = -1) -> bytes: """ Read and return up to n bytes.