docs: def readByteArray(self):
          """
          Reads a string of data from the stream.
  
          Detects if the L{ByteArray} was compressed using C{zlib}.
  
          @see: L{ByteArray}
          @note: This is not supported in ActionScript 1.0 and 2.0.
          """
          ref = self.readInteger(False)
  
          if ref & REFERENCE_BIT == 0:
              return self.context.getObject(ref >> 1)
  
          buffer = self.stream.read(ref >> 1)
  
          try:
              buffer = zlib.decompress(buffer)
              compressed = True
          except zlib.error:
              compressed = False
  
          obj = ByteArray(buffer)
          obj.compressed = compressed
  
          self.context.addObject(obj)
  
          return obj