Exemplo 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));
        }
Exemplo n.º 2
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));
		}