Help on module _compression: NAME _compression - Internal classes used by the gzip, lzma and bz2 modules MODULE REFERENCE https://docs.python.org/3.12/library/_compression.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. CLASSES io.BufferedIOBase(_io._BufferedIOBase, io.IOBase) BaseStream io.RawIOBase(_io._RawIOBase, io.IOBase) DecompressReader class BaseStream(io.BufferedIOBase) | Mode-checking helper functions. | | Method resolution order: | BaseStream | io.BufferedIOBase | _io._BufferedIOBase | io.IOBase | _io._IOBase | builtins.object | | Data and other attributes defined here: | | __abstractmethods__ = frozenset() | | ---------------------------------------------------------------------- | Methods inherited from _io._BufferedIOBase: | | detach(self, /) | Disconnect this buffer from its underlying raw stream and return it. | | After the raw stream has been detached, the buffer is in an unusable | state. | | read(self, size=-1, /) | Read and return up to n bytes. | | If the size argument is omitted, None, or negative, read and | return all data until EOF. | | If the size argument is positive, and the underlying raw stream is | not 'interactive', multiple raw reads may be issued to satisfy | the byte count (unless EOF is reached first). | However, for interactive raw streams (as well as sockets and pipes), | at most one raw read will be issued, and a short result does not | imply that EOF is imminent. | | Return an empty bytes object on EOF. | | Return None if the underlying raw stream was open in non-blocking | mode and no data is available at the moment. | | read1(self, size=-1, /) | Read and return up to size bytes, with at most one read() call to the underlying raw stream. | | Return an empty bytes object on EOF. | A short result does not imply that EOF is imminent. | | readinto(self, buffer, /) | | readinto1(self, buffer, /) | | write(self, b, /) | Write buffer b to the IO stream. | | Return the number of bytes written, which is always | the length of b in bytes. | | Raise BlockingIOError if the buffer is full and the | underlying raw stream cannot accept more data at the moment. | | ---------------------------------------------------------------------- | Methods inherited from _io._IOBase: | | __del__(...) | | __enter__(...) | | __exit__(...) | | __iter__(self, /) | Implement iter(self). | | __next__(self, /) | Implement next(self). | | close(self, /) | Flush and close the IO object. | | This method has no effect if the file is already closed. | | fileno(self, /) | Return underlying file descriptor if one exists. | | Raise OSError if the IO object does not use a file descriptor. | | flush(self, /) | Flush write buffers, if applicable. | | This is not implemented for read-only and non-blocking streams. | | isatty(self, /) | Return whether this is an 'interactive' stream. | | Return False if it can't be determined. | | readable(self, /) | Return whether object was opened for reading. | | If False, read() will raise OSError. | | readline(self, size=-1, /) | Read and return a line from the stream. | | If size is specified, at most size bytes will be read. | | The line terminator is always b'\n' for binary files; for text | files, the newlines argument to open can be used to select the line | terminator(s) recognized. | | readlines(self, hint=-1, /) | Return a list of lines from the stream. | | hint can be specified to control the number of lines read: no more | lines will be read if the total size (in bytes/characters) of all | lines so far exceeds hint. | | seek(self, offset, whence=0, /) | Change the stream position to the given byte offset. | | offset | The stream position, relative to 'whence'. | whence | The relative position to seek from. | | The offset is interpreted relative to the position indicated by whence. | Values for whence are: | | * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive | * os.SEEK_CUR or 1 -- current stream position; offset may be negative | * os.SEEK_END or 2 -- end of stream; offset is usually negative | | Return the new absolute position. | | seekable(self, /) | Return whether object supports random access. | | If False, seek(), tell() and truncate() will raise OSError. | This method may need to do a test seek(). | | tell(self, /) | Return current stream position. | | truncate(self, size=None, /) | Truncate file to size bytes. | | File pointer is left unchanged. Size defaults to the current IO position | as reported by tell(). Return the new size. | | writable(self, /) | Return whether object was opened for writing. | | If False, write() will raise OSError. | | writelines(self, lines, /) | Write a list of lines to stream. | | Line separators are not added, so it is usual for each of the | lines provided to have a line separator at the end. | | ---------------------------------------------------------------------- | Data descriptors inherited from _io._IOBase: | | __dict__ | | closed class DecompressReader(io.RawIOBase) | DecompressReader(fp, decomp_factory, trailing_error=(), **decomp_args) | | Adapts the decompressor API to a RawIOBase reader API | | Method resolution order: | DecompressReader | io.RawIOBase | _io._RawIOBase | io.IOBase | _io._IOBase | builtins.object | | Methods defined here: | | __init__(self, fp, decomp_factory, trailing_error=(), **decomp_args) | Initialize self. See help(type(self)) for accurate signature. | | close(self) | Flush and close the IO object. | | This method has no effect if the file is already closed. | | read(self, size=-1) | | readable(self) | Return whether object was opened for reading. | | If False, read() will raise OSError. | | readall(self) | Read until EOF, using multiple read() call. | | readinto(self, b) | | seek(self, offset, whence=0) | Change the stream position to the given byte offset. | | offset | The stream position, relative to 'whence'. | whence | The relative position to seek from. | | The offset is interpreted relative to the position indicated by whence. | Values for whence are: | | * os.SEEK_SET or 0 -- start of stream (the default); offset should be zero or positive | * os.SEEK_CUR or 1 -- current stream position; offset may be negative | * os.SEEK_END or 2 -- end of stream; offset is usually negative | | Return the new absolute position. | | seekable(self) | Return whether object supports random access. | | If False, seek(), tell() and truncate() will raise OSError. | This method may need to do a test seek(). | | tell(self) | Return the current file position. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __abstractmethods__ = frozenset() | | ---------------------------------------------------------------------- | Methods inherited from _io._RawIOBase: | | write(...) | | ---------------------------------------------------------------------- | Methods inherited from _io._IOBase: | | __del__(...) | | __enter__(...) | | __exit__(...) | | __iter__(self, /) | Implement iter(self). | | __next__(self, /) | Implement next(self). | | fileno(self, /) | Return underlying file descriptor if one exists. | | Raise OSError if the IO object does not use a file descriptor. | | flush(self, /) | Flush write buffers, if applicable. | | This is not implemented for read-only and non-blocking streams. | | isatty(self, /) | Return whether this is an 'interactive' stream. | | Return False if it can't be determined. | | readline(self, size=-1, /) | Read and return a line from the stream. | | If size is specified, at most size bytes will be read. | | The line terminator is always b'\n' for binary files; for text | files, the newlines argument to open can be used to select the line | terminator(s) recognized. | | readlines(self, hint=-1, /) | Return a list of lines from the stream. | | hint can be specified to control the number of lines read: no more | lines will be read if the total size (in bytes/characters) of all | lines so far exceeds hint. | | truncate(self, size=None, /) | Truncate file to size bytes. | | File pointer is left unchanged. Size defaults to the current IO position | as reported by tell(). Return the new size. | | writable(self, /) | Return whether object was opened for writing. | | If False, write() will raise OSError. | | writelines(self, lines, /) | Write a list of lines to stream. | | Line separators are not added, so it is usual for each of the | lines provided to have a line separator at the end. | | ---------------------------------------------------------------------- | Data descriptors inherited from _io._IOBase: | | __dict__ | | closed DATA BUFFER_SIZE = 8192 FILE /usr/lib/python3.12/_compression.py
Generated by phpman v4.12.29 · Markdown · JSON Author: Che Dong Under GNU General Public License
2026-12-02 01:00 @216.73.216.10
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)