Esempio n. 1
0
        public GZipPacker()
        {
            fifo = new Fifo();

            zs = new ZStream();
            zs.deflateInit(-1, -15);

            this.currentSize = 0;
            this.crc32       = 0xffffffff;
            this.finished    = false;

            GZipHeader h = new GZipHeader();

            h.ID1   = 0x1f;
            h.ID2   = 0x8b;
            h.FLG   = 0;
            h.MTIME = Util.DateTimeToUnixTime(DateTime.Now.ToUniversalTime());
            h.XFL   = 0;
            h.OS    = 3;
            h.CM    = 8;

            fifo.Write(Util.StructToByte(h));
        }
Esempio n. 2
0
 public ZipPacker()
 {
     fifo     = new Fifo();
     fileList = new List <File>();
 }
Esempio n. 3
0
 public TarPacker(Encoding encoding)
 {
     fifo          = new Fifo();
     dirList       = new Dictionary <string, int>(new StrEqualityComparer(true));
     this.encoding = encoding;
 }