open¶
- tinycompress.lzssw.open(filename, mode='r', encoding=None, errors=None, newline=None)[source]¶
Opens an LZSSW compressed file.
This provides a high-level interface similar to the built-in open() function but for LZSSW compressed files. It supports both binary and text modes with default compression parameters.
- Parameters:
filename (
str|bytes|IO) – Path to file or file object.mode (
str) – File open mode (‘r’/’rb’ for reading, ‘w’/’wb’/’x’/’xb’/’a’/’ab’ for writing).encoding (
str|None) – Text encoding for text mode.errors (
str|None) – How to handle encoding/decoding errors in text mode.newline (
str|None) – How to handle newlines in text mode.
- Returns:
A CodecFile for binary mode or TextIOWrapper for text mode.
- Raises:
ValueError – For invalid mode combinations.