File indexing completed on 2024-04-28 15:53:57
0001 # AUTO-GENERATED FILE -- DO NOT EDIT 0002 0003 """ The python bz2 module provides a comprehensive interface for 0004 the bz2 compression library. It implements a complete file 0005 interface, one shot (de)compression functions, and types for 0006 sequential (de)compression. 0007 """ 0008 0009 class BZ2Compressor(object): 0010 """ BZ2Compressor([compresslevel=9]) -> compressor object 0011 0012 Create a new compressor object. This object may be used to compress 0013 data sequentially. If you want to compress data in one shot, use the 0014 compress() function instead. The compresslevel parameter, if given, 0015 must be a number between 1 and 9. 0016 """ 0017 0018 def __init__(self, compresslevel=9): 0019 """ x.__init__(...) initializes x; see help(type(x)) for signature """ 0020 return None 0021 0022 def compress(self, data): 0023 """ compress(data) -> string 0024 0025 Provide more data to the compressor object. It will return chunks of 0026 compressed data whenever possible. When you've finished providing data 0027 to compress, call the flush() method to finish the compression process, 0028 and return what is left in the internal buffers. 0029 """ 0030 return "" 0031 0032 def flush(self): 0033 """ flush() -> string 0034 0035 Finish the compression process and return what is left in internal buffers. 0036 You must not use the compressor object after calling this method. 0037 """ 0038 return "" 0039 0040 class BZ2Decompressor(object): 0041 """ BZ2Decompressor() -> decompressor object 0042 0043 Create a new decompressor object. This object may be used to decompress 0044 data sequentially. If you want to decompress data in one shot, use the 0045 decompress() function instead. 0046 """ 0047 0048 def __init__(self): 0049 """ x.__init__(...) initializes x; see help(type(x)) for signature """ 0050 return None 0051 0052 def decompress(self, data): 0053 """ decompress(data) -> string 0054 0055 Provide more data to the decompressor object. It will return chunks 0056 of decompressed data whenever possible. If you try to decompress data 0057 after the end of stream is found, EOFError will be raised. If any data 0058 was found after the end of stream, it'll be ignored and saved in 0059 unused_data attribute. 0060 """ 0061 return "" 0062 0063 unused_data = None 0064 0065 class BZ2File(object): 0066 """ BZ2File(name [, mode='r', buffering=0, compresslevel=9]) -> file object 0067 0068 Open a bz2 file. The mode can be 'r' or 'w', for reading (default) or 0069 writing. When opened for writing, the file will be created if it doesn't 0070 exist, and truncated otherwise. If the buffering argument is given, 0 means 0071 unbuffered, and larger numbers specify the buffer size. If compresslevel 0072 is given, must be a number between 1 and 9. 0073 0074 Add a 'U' to mode to open the file for input with universal newline 0075 support. Any line ending in the input file will be seen as a '\\n' in 0076 Python. Also, a file so opened gains the attribute 'newlines'; the value 0077 for this attribute is one of None (no newline read yet), '\\r', '\\n', 0078 '\\r\\n' or a tuple containing all the newline types seen. Universal 0079 newlines are available only when reading. 0080 """ 0081 0082 def __init__(self, name, mode='r', buffering=0, compresslevel=9): 0083 """ x.__init__(...) initializes x; see help(type(x)) for signature """ 0084 return file(__file__) 0085 0086 def close(self): 0087 """ close() -> None or (perhaps) an integer 0088 0089 Close the file. Sets data attribute .closed to true. A closed file 0090 cannot be used for further I/O operations. close() may be called more 0091 than once without error. 0092 """ 0093 return 1 0094 0095 closed = property(None, None, None, 0096 """ True if the file is closed """ 0097 ) 0098 0099 mode = property(None, None, None, 0100 """ file mode ('r', 'w', or 'U') """ 0101 ) 0102 0103 name = property(None, None, None, 0104 """ file name """ 0105 ) 0106 0107 newlines = property(None, None, None, 0108 """ end-of-line convention used in this file """ 0109 ) 0110 0111 0112 def next(self): 0113 """ x.next() -> the next value, or raise StopIteration """ 0114 return None 0115 0116 def read(self, size=None): 0117 """ read([size]) -> string 0118 0119 Read at most size uncompressed bytes, returned as a string. If the size 0120 argument is negative or omitted, read until EOF is reached. 0121 """ 0122 return "" 0123 0124 def readline(self, size=None): 0125 """ readline([size]) -> string 0126 0127 Return the next line from the file, as a string, retaining newline. 0128 A non-negative size argument will limit the maximum number of bytes to 0129 return (an incomplete line may be returned then). Return an empty 0130 string at EOF. 0131 """ 0132 return "" 0133 0134 def readlines(self, size=None): 0135 """ readlines([size]) -> list 0136 0137 Call readline() repeatedly and return a list of lines read. 0138 The optional size argument, if given, is an approximate bound on the 0139 total number of bytes in the lines returned. 0140 """ 0141 return [] 0142 0143 def seek(self, offset, whence=None): 0144 """ seek(offset [, whence]) -> None 0145 0146 Move to new file position. Argument offset is a byte count. Optional 0147 argument whence defaults to 0 (offset from start of file, offset 0148 should be >= 0); other values are 1 (move relative to current position, 0149 positive or negative), and 2 (move relative to end of file, usually 0150 negative, although many platforms allow seeking beyond the end of a file). 0151 0152 Note that seeking of bz2 files is emulated, and depending on the parameters 0153 the operation may be extremely slow. 0154 """ 0155 return None 0156 0157 softspace = None 0158 0159 def tell(self): 0160 """ tell() -> int 0161 0162 Return the current file position, an integer (may be a long integer). 0163 """ 0164 return 1 0165 0166 def write(self, data): 0167 """ write(data) -> None 0168 0169 Write the 'data' string to file. Note that due to buffering, close() may 0170 be needed before the file on disk reflects the data written. 0171 """ 0172 return None 0173 0174 def writelines(self, sequence_of_strings): 0175 """ writelines(sequence_of_strings) -> None 0176 0177 Write the sequence of strings to the file. Note that newlines are not 0178 added. The sequence can be any iterable object producing strings. This is 0179 equivalent to calling write() for each string. 0180 """ 0181 return None 0182 0183 def xreadlines(self): 0184 """ xreadlines() -> self 0185 0186 For backward compatibility. BZ2File objects now include the performance 0187 optimizations previously implemented in the xreadlines module. 0188 """ 0189 return None 0190 0191 __author__ = """The bz2 python module was written by: 0192 0193 Gustavo Niemeyer <niemeyer@conectiva.com> 0194 """ 0195 __package__ = None 0196 0197 def compress(data, compresslevel=9): 0198 """ compress(data [, compresslevel=9]) -> string 0199 0200 Compress data in one shot. If you want to compress data sequentially, 0201 use an instance of BZ2Compressor instead. The compresslevel parameter, if 0202 given, must be a number between 1 and 9. 0203 """ 0204 return "" 0205 0206 def decompress(data): 0207 """ decompress(data) -> decompressed data 0208 0209 Decompress data in one shot. If you want to decompress data sequentially, 0210 use an instance of BZ2Decompressor instead. 0211 """ 0212 return None 0213