public static BlockWriterStream ToStream(Stream baseStream, uint alignment, Endian endian, bool compress) { var instance = new BlockWriterStream(baseStream, alignment, endian, compress); baseStream.WriteValueU32(Signature, endian); baseStream.WriteValueU32(alignment, endian); baseStream.WriteValueU8(4); return(instance); }
public static BlockWriterStream ToStream(Stream baseStream, uint alignment, Endian endian, bool compress, bool bUseOodle) { var instance = new BlockWriterStream(baseStream, alignment, endian, compress, bUseOodle); baseStream.WriteValueU32(Signature, endian); var headerAlignment = (instance._bUseOodle && compress ? (alignment | 0x1000000) : alignment); baseStream.WriteValueU32(headerAlignment, endian); baseStream.WriteValueU8(4); return(instance); }