Esempio n. 1
0
		uint WriteCompressedUInt32(BinaryWriter writer, uint value) {
			return writer.WriteCompressedUInt32(helper, value);
		}
Esempio n. 2
0
 /// <inheritdoc/>
 protected override void WriteToImpl(BinaryWriter writer)
 {
     if (originalData != null)
         writer.Write(originalData);
     else
         writer.Write((byte)0);
     foreach (var s in cached) {
         writer.WriteCompressedUInt32((uint)s.Length * 2 + 1);
         byte last = 0;
         for (int i = 0; i < s.Length; i++) {
             ushort c = (ushort)s[i];
             writer.Write(c);
             if (c > 0xFF || (1 <= c && c <= 8) || (0x0E <= c && c <= 0x1F) || c == 0x27 || c == 0x2D || c == 0x7F)
                 last = 1;
         }
         writer.Write(last);
     }
 }
Esempio n. 3
0
		/// <inheritdoc/>
		protected override void WriteToImpl(BinaryWriter writer) {
			if (originalData != null)
				writer.Write(originalData);
			else
				writer.Write((byte)0);
			foreach (var data in cached) {
				writer.WriteCompressedUInt32((uint)data.Length);
				writer.Write(data);
			}
		}