Sha256: f0d428426c9b43cee51631903c8efb809da3170bb2a5017e1de01a7784499ccb
Contents?: true
Size: 484 Bytes
Versions: 1
Compression:
Stored size: 484 Bytes
Contents
require 'bit_struct/endianess.rb' module BitStruct class ByteData include Endianess def self.endianize( data, endianess = nil ) raise "Bad input" unless data.respond_to? "[]".to_sym raise "Unknown endianess" unless valid endianess data = data.reverse if ( endianess || BIG_ENDIAN ) == LITTLE_ENDIAN data end def self.valid( endianess ) endianess == nil || endianess == LITTLE_ENDIAN || endianess == BIG_ENDIAN end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
BitStructEx-0.0.91 | src/bit_struct/byte_data.rb |