public static GetFloatDecompressor ( StreamCompressionType compressedType ) : FloatStreamDecompressor | ||
compressedType | StreamCompressionType | |
return | FloatStreamDecompressor |
public override void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { FloatStreamDecompressor decompressor = StreamDecompressors.GetFloatDecompressor(element.CompressionType); float x = decompressor(reader); float y = decompressor(reader); float z = decompressor(reader); writer.Write(x); writer.Write(y); writer.Write(z); }
public virtual void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { int count = Math.Min(this.NumValues, element.NumElements); FloatStreamDecompressor decompressor = StreamDecompressors.GetFloatDecompressor(element.CompressionType); for (var i = 0; i < count; i++) { float val = decompressor(reader); writer.Write(val); } }