class Excon::Socket

def rewind_read_buffer(chunk, idx)

The offset is moved back to the start of the current chunk and then forward until just after the index.
Rewind the read buffer to just after the given index.
def rewind_read_buffer(chunk, idx)
  @read_offset = @read_offset - chunk.length + (idx + 1)
  @eof = false
end