<s> from struct import pack <EOL> from vertica_python . vertica . messages . message import FrontendMessage <EOL> class CopyStream ( FrontendMessage ) : <EOL> def __init__ ( self , stream , buffer_size = <NUM_LIT> ) : <EOL> self . stream = stream <EOL> self . bufsize = buffer_size <EOL> def read_bytes ( self ) : <EOL> data = self . stream . read ( self . bufsize ) <EOL> if len ( data ) == <NUM_LIT:0> : <EOL> return data <EOL> return self . message_string ( data ) <EOL> CopyStream . _message_id ( b'<STR_LIT:d>' ) </s>
