class_docstr: A file object providing transparent bzip2 (de)compression.
  
  A BZ2File can act as a wrapper for an existing file object, or refer
  directly to a named file on disk.
  
  Note that BZ2File provides a *binary* file interface - data read is
  returned as bytes, and data to be written should be given as bytes.
class_docstr_tok: ["A","file","object","providing","transparent","bzip2","(","de",")","compression",".","A","BZ2File","can","act","as","a","wrapper","for","an","existing","file","object",",","or","refer","directly","to","a","named","file","on","disk",".","Note","that","BZ2File","provides","a","*","binary","*","file","interface","-","data","read","is","returned","as","bytes",",","and","data","to","be","written","should","be","given","as","bytes","."]
docstr: Read up to size uncompressed bytes, while trying to avoid
  making multiple reads from the underlying stream. Reads up to a
  buffer's worth of data if size is negative.
  
  Returns b'' if the file is at EOF.
docstr_tok: ["Read","up","to","size","uncompressed","bytes",",","while","trying","to","avoid","making","multiple","reads","from","the","underlying","stream",".","Reads","up","to","a","buffer","'s","worth","of","data","if","size","is","negative",".","Returns","b","''","if","the","file","is","at","EOF","."]
code: def read1(self, size=-1):
      """Read up to size uncompressed bytes, while trying to avoid
      making multiple reads from the underlying stream. Reads up to a
      buffer's worth of data if size is negative.
  
      Returns b'' if the file is at EOF.
      """
      self._check_can_read()
      if size < 0:
          size = io.DEFAULT_BUFFER_SIZE
      return self._buffer.read1(size)
  
imports: from builtins import open
  import io
  import os
  import _compression
  from _bz2 import BZ2Compressor, BZ2Decompressor
label_desc: Use image node_id 10 for calling the BZ2File obj's underlying member method code with example usage: obj.read1(size) and returns: self