#NEWLINE# def read_fast( self , size ) : #NEWLINE# #INDENT# ' Faster version of read\n\n        Instead of returning sliced buffer it returns reference to internal\n        buffer and the offset to this buffer.\n\n        :param size: Number of bytes to read\n        :returns: Tuple of bytes buffer, and offset in this buffer\n        ' #NEWLINE# if ( self . _pos >= len ( self . _buf ) ) : #NEWLINE# #INDENT# if ( self . _have >= self . _size ) : #NEWLINE# #INDENT# self . _read_packet ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _buf = self . _transport . read ( ( self . _size - self . _have ) ) #NEWLINE# self . _pos = 0 #NEWLINE# self . _have += len ( self . _buf ) #NEWLINE# #UNINDENT# #UNINDENT# offset = self . _pos #NEWLINE# self . _pos += size #NEWLINE# return ( self . _buf , offset )