class Net::SSH::Buffer

def read!(count = nil)

and then consumes (as #consume!) all data up to the new read position.
Reads (as #read) and returns the given number of bytes from the buffer,
def read!(count = nil)
  data = read(count)
  consume!
  data
end