public static Sscc96Tag FromBinary(BitArray rawBits) { uint header = rawBits.DecodeUInt32(0, 8); if (header != BinaryHeader) { throw new FormatException(string.Format("Invalid EPC Header: 0x{0:X2} (expected 0x{1:X2)", header, BinaryHeader)); } string companyPrefix; string extensionAndSerial; byte partition; byte filter = rawBits.DecodeByte(8, 3); rawBits.DecodePartition(PartitionTable, 11, out partition, out companyPrefix, out extensionAndSerial); return(new Sscc96Tag(filter, partition, companyPrefix, extensionAndSerial)); }