public override void WriteTo(ShockwaveWriter output)
 {
     output.WriteVarInt(Id);
     output.WriteVarInt(Offset);
     output.WriteVarInt(Length);
     output.WriteVarInt(DecompressedLength);
     output.WriteVarInt(CompressionType);
     output.WriteBE((int)Header.Kind);
 }
        public override void WriteBodyTo(ShockwaveWriter output)
        {
            output.Write((byte)0);
            output.WriteVarInt((int)Remnants.Dequeue());
            //TODO: Wrap dat compressor
            output.WriteVarInt((int)Remnants.Dequeue());
            output.WriteVarInt((int)Remnants.Dequeue());

            output.WriteVarInt(Entries.Length);
            foreach (var entry in Entries)
            {
                entry.WriteTo(output);
            }
        }
Exemplo n.º 3
0
 public override void WriteTo(ShockwaveWriter output)
 {
     output.WriteBE((int)Kind);
     if (IsVariableLength)
     {
         output.WriteVarInt(Length);
     }
     else
     {
         output.WriteBE(Length);
     }
 }