I am doing some low level bit manipulation in Ruby and was wondering if there was the Ruby equivalent of the htonl()
and ntohl()
functions in C?
I came across the .pack method, but does [1024].pack("N")
provide a suitable replacement for htonl?