Exemple #1
0
// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      using (ZipFile zip = new ZipFile()) {
        HelloWorldCompression hello = new HelloWorldCompression();
        zip.AddEntry(RESULT1, hello.CreatePdf(-1));
        byte[] compress0 = hello.CreatePdf(0);
        zip.AddEntry(RESULT2, compress0);
        zip.AddEntry(RESULT3, hello.CreatePdf(1));
        zip.AddEntry(RESULT4, hello.CreatePdf(2));
        zip.AddEntry(RESULT5, hello.CreatePdf(3));
        byte[] compress6 = hello.CompressPdf(compress0);
        zip.AddEntry(RESULT6, compress6);
        zip.AddEntry(RESULT7, hello.DecompressPdf(compress6));
        zip.Save(stream);
      }    
    }
Exemple #2
0
// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      using (ZipFile zip = new ZipFile()) {
        HelloWorldCompression hello = new HelloWorldCompression();
        zip.AddEntry(RESULT1, hello.CreatePdf(-1));
        byte[] compress0 = hello.CreatePdf(0);
        zip.AddEntry(RESULT2, compress0);
        zip.AddEntry(RESULT3, hello.CreatePdf(1));
        zip.AddEntry(RESULT4, hello.CreatePdf(2));
        zip.AddEntry(RESULT5, hello.CreatePdf(3));
        byte[] compress6 = hello.CompressPdf(compress0);
        zip.AddEntry(RESULT6, compress6);
        zip.AddEntry(RESULT7, hello.DecompressPdf(compress6));
        zip.Save(stream);
      }    
    }