コード例 #1
0
        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; }
            }
        }
コード例 #2
0
        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.");
            }
        }
コード例 #3
0
 public static void Expand(YAY0 *header, VoidPtr dstAddr, int dstLen)
 {
     RunLength.ExpandYAY0(header, dstAddr, dstLen);
 }
コード例 #4
0
 internal static unsafe void CompactYAZ0(VoidPtr srcAddr, int srcLen, Stream outStream, ResourceNode r)
 {
     RunLength.CompactYAZ0(srcAddr, srcLen, outStream, r);
 }
コード例 #5
0
ファイル: RunLength.cs プロジェクト: KingAtreyu/super-sawndz
 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));
 }
コード例 #6
0
 internal static unsafe void CompactYAZ0(VoidPtr srcAddr, int srcLen, Stream outStream)
 {
     RunLength.CompactYAZ0(srcAddr, srcLen, outStream, null);
 }