# File lib/binary_writer.rb, line 45 def write_int16_little(val) pw(val, 'v') end
# File lib/binary_writer.rb, line 41 def write_int16_native(val) pw(val, 's') end
# File lib/binary_writer.rb, line 49 def write_int16_network(val) pw(val, 'n') end
# File lib/binary_writer.rb, line 79 def write_int32_little(val) pw(val, 'V') end
# File lib/binary_writer.rb, line 75 def write_int32_native(val) pw(val, 'l') end
# File lib/binary_writer.rb, line 83 def write_int32_network(val) pw(val, 'N') end
# File lib/binary_writer.rb, line 13 def write_int8(val) pw(val, 'c') end
# File lib/binary_writer.rb, line 27 def write_word16_little(val) str = [val].pack('S') str.reverse! if ByteOrder.network? # swap bytes as native=network (and we want little) write(str) end
# File lib/binary_writer.rb, line 23 def write_word16_native(val) pw(val, 'S') end
# File lib/binary_writer.rb, line 33 def write_word16_network(val) str = [val].pack('S') str.reverse! if ByteOrder.little? # swap bytes as native=little (and we want network) write(str) end
# File lib/binary_writer.rb, line 61 def write_word32_little(val) str = [val].pack('L') str.reverse! if ByteOrder.network? # swap bytes as native=network (and we want little) write(str) end
# File lib/binary_writer.rb, line 57 def write_word32_native(val) pw(val, 'L') end
# File lib/binary_writer.rb, line 67 def write_word32_network(val) str = [val].pack('L') str.reverse! if ByteOrder.little? # swap bytes as native=little (and we want network) write(str) end
no byteorder for 8 bit!
# File lib/binary_writer.rb, line 9 def write_word8(val) pw(val, 'C') end
Generated with the Darkfish Rdoc Generator 2.