# File lib/bson/byte_buffer.rb, line 113
    def put_num(i, offset, bytes)
      pack_type = bytes == 4 ? INT32_PACK : INT64_PACK
      @cursor = offset if offset
      if more?
        @str[@cursor, bytes] = [i].pack(pack_type)
      else
        ensure_length(@cursor)
        @str << [i].pack(pack_type)
      end
      @cursor += bytes
    end