public static unsafe void Compact(CompressionType type, VoidPtr srcAddr, int srcLen, Stream outStream, ResourceNode r) { switch (type) { case CompressionType.LZ77: { LZ77.Compact(srcAddr, srcLen, outStream, r, false); break; } case CompressionType.ExtendedLZ77: { LZ77.Compact(srcAddr, srcLen, outStream, r, true); break; } case CompressionType.RunLength: { RunLength.Compact(srcAddr, srcLen, outStream, r); break; } } }
public static void Expand(CompressionHeader *header, VoidPtr dstAddr, int dstLen) { switch (header->Algorithm) { case CompressionType.LZ77: case CompressionType.ExtendedLZ77: { LZ77.Expand(header, dstAddr, dstLen); break; } case CompressionType.RunLength: { RunLength.Expand(header, dstAddr, dstLen); break; } //case CompressionType.Huffman: { Huffman.Expand(header, dstAddr, dstLen); break; } //case CompressionType.Differential: { Differential.Expand(header, dstAddr, dstLen); break; } default: throw new InvalidCompressionException("Unknown compression type."); } }
public static void Expand(YAY0 *header, VoidPtr dstAddr, int dstLen) { RunLength.ExpandYAY0(header, dstAddr, dstLen); }
internal static unsafe void CompactYAZ0(VoidPtr srcAddr, int srcLen, Stream outStream, ResourceNode r) { RunLength.CompactYAZ0(srcAddr, srcLen, outStream, r); }
public static int CompactYAZ0(VoidPtr srcAddr, int srcLen, Stream outStream, string name) { using (RunLength rl = new RunLength()) using (ProgressWindow prog = new ProgressWindow(null, "RunLength - YAZ0", String.Format("Compressing {0}, please wait...", name), false)) return(rl.CompressYAZ0(srcAddr, srcLen, outStream, prog)); }
internal static unsafe void CompactYAZ0(VoidPtr srcAddr, int srcLen, Stream outStream) { RunLength.CompactYAZ0(srcAddr, srcLen, outStream, null); }