Example #1
0
 public LzCompound()
 {
     for (int i = 0; i < _entries.Length; ++i)
     {
         _entries[i] = new NormalEntry(0);
     }
 }
Example #2
0
 public LzCompound(BinaryReader reader)
 {
     byte decoder = reader.ReadByte();
     for (int i = 0; i < 8; ++i)
     {
         if ((decoder & (1 << 7 - i)) != 0)
         {
             _entries[i] = new CompressedEntry((ushort) ((reader.ReadByte() << 8) | (reader.ReadByte())));
         }
         else
         {
             _entries[i] = new NormalEntry(reader.ReadByte());
         }
     }
 }