## # Converts a integer to multi character network string # # @param [Integer, #net_pack_int] int decimal based number # @param [Integer] size max length of the network string # @return [String] the int converted to base NET_INT_BASE def net_pack_bigint(int, size) sum = "" div = size - 1 (size - 1).times do buf = int / (NET_MAX_INT ** div) sum += net_pack_int(buf) int = int % (NET_MAX_INT ** div) end sum += net_pack_int(int) # TODO: check reminder and so on # throw and error when int is too big for size int = int / NET_MAX_INT sum end