Ejemplo n.º 1
0
 public static void WriteCompressedData(BinaryFileWriter writer, byte[] data, bool prefixUncompressedSize, bool prefixCompressedSize)
 {
     byte[] compressed = Compress(data);
     if (prefixUncompressedSize)
         writer.WriteEncodedInt(data.Length);
     if (prefixCompressedSize)
         writer.WriteEncodedInt(compressed.Length);
     writer.Write(compressed, 0, compressed.Length);
 }