コード例 #1
0
ファイル: ZipStream.cs プロジェクト: Tsalex71/mono-1
        public ZipStream(Stream dataStream, bool ownsStream)
        {
            // FIXME: Not necessarily true
            canRead  = true;
            canSeek  = true;
            canWrite = true;

            DataStream = dataStream;
            OwnsStream = ownsStream;

            ZlibFileFuncDef32 f32 = new ZlibFileFuncDef32();

            f32.opaque      = IntPtr.Zero;
            f32.zclose_file = CloseFile_Native;
            f32.zerror_file = TestError_Native;
            f32.zopen_file  = OpenFile_Native;
            f32.zread_file  = ReadFile_Native32;
            f32.zseek_file  = SeekFile_Native32;
            f32.ztell_file  = TellFile_Native32;
            f32.zwrite_file = WriteFile_Native32;
            IOFunctions32   = f32;

            ZlibFileFuncDef64 f64 = new ZlibFileFuncDef64();

            f64.opaque      = IntPtr.Zero;
            f64.zclose_file = CloseFile_Native;
            f64.zerror_file = TestError_Native;
            f64.zopen_file  = OpenFile_Native;
            f64.zread_file  = ReadFile_Native64;
            f64.zseek_file  = SeekFile_Native64;
            f64.ztell_file  = TellFile_Native64;
            f64.zwrite_file = WriteFile_Native64;
            IOFunctions64   = f64;
        }
コード例 #2
0
ファイル: NativeZip.cs プロジェクト: ItsVeryWindy/mono
		public static ZipHandle OpenArchive32 (ZlibFileFuncDef32 funcDef, Append append)
		{
			ZipHandle h = zipOpen2_32 ("", (int) append, IntPtr.Zero, ref funcDef);
			if (h.IsInvalid)
				throw new Exception ("Could not open the zip archive");
			return h;
		}
コード例 #3
0
ファイル: ZipStream.cs プロジェクト: ItsVeryWindy/mono
		public ZipStream (Stream dataStream, bool ownsStream)
		{
			// FIXME: Not necessarily true
			canRead = true;
			canSeek = true;
			canWrite = true;

			DataStream = dataStream;
			OwnsStream = ownsStream;
			
			ZlibFileFuncDef32 f32 = new ZlibFileFuncDef32 ();
			f32.opaque = IntPtr.Zero;
			f32.zclose_file = CloseFile_Native;
			f32.zerror_file = TestError_Native;
			f32.zopen_file = OpenFile_Native;
			f32.zread_file = ReadFile_Native32;
			f32.zseek_file = SeekFile_Native32;
			f32.ztell_file = TellFile_Native32;
			f32.zwrite_file = WriteFile_Native32;
			IOFunctions32 = f32;

			ZlibFileFuncDef64 f64 = new ZlibFileFuncDef64 ();
			f64.opaque = IntPtr.Zero;
			f64.zclose_file = CloseFile_Native;
			f64.zerror_file = TestError_Native;
			f64.zopen_file = OpenFile_Native;
			f64.zread_file = ReadFile_Native64;
			f64.zseek_file = SeekFile_Native64;
			f64.ztell_file = TellFile_Native64;
			f64.zwrite_file = WriteFile_Native64;
			IOFunctions64 = f64;
		}
コード例 #4
0
ファイル: NativeZip.cs プロジェクト: samcf111/unityMono5.5.0
        public static ZipHandle OpenArchive32(ZlibFileFuncDef32 funcDef, Append append)
        {
            ZipHandle h = zipOpen2_32("", (int)append, IntPtr.Zero, ref funcDef);

            if (h.IsInvalid)
            {
                throw new Exception("Could not open the zip archive");
            }
            return(h);
        }
コード例 #5
0
        public static UnzipHandle OpenArchive32(ZlibFileFuncDef32 fileFuncs)
        {
            UnzipHandle handle = unzOpen2_32("", ref fileFuncs);

            if (handle.IsInvalid)
            {
                throw new Exception("Could not open unzip archive");
            }
            return(handle);
        }
コード例 #6
0
ファイル: NativeZip.cs プロジェクト: ItsVeryWindy/mono
		static extern ZipHandle zipOpen2_32 (string pathname,
		                                     int append,
		                                     IntPtr globalcomment, // zipcharpc*
		                                     ref ZlibFileFuncDef32 pzlib_filefunc_def); // zlib_filefunc_def*
コード例 #7
0
ファイル: NativeZip.cs プロジェクト: samcf111/unityMono5.5.0
 static extern ZipHandle zipOpen2_32(string pathname,
                                     int append,
                                     IntPtr globalcomment,                      // zipcharpc*
                                     ref ZlibFileFuncDef32 pzlib_filefunc_def); // zlib_filefunc_def*
コード例 #8
0
ファイル: NativeUnzip.cs プロジェクト: ItsVeryWindy/mono
		static extern UnzipHandle unzOpen2_32 (string path,
		                                       ref ZlibFileFuncDef32 pzlib_filefunc_def);
コード例 #9
0
ファイル: NativeUnzip.cs プロジェクト: ItsVeryWindy/mono
		public static UnzipHandle OpenArchive32 (ZlibFileFuncDef32 fileFuncs)
		{
			UnzipHandle handle = unzOpen2_32 ("", ref fileFuncs);
			if (handle.IsInvalid)
				throw new Exception ("Could not open unzip archive");
			return handle;
		}
コード例 #10
0
 static extern UnzipHandle unzOpen2_32(string path,
                                       ref ZlibFileFuncDef32 pzlib_filefunc_def);