├── .gitignore ├── BuildProcessTemplates ├── DefaultTemplate.11.1.xaml ├── DefaultTemplate.xaml ├── LabDefaultTemplate.11.xaml └── UpgradeTemplate.xaml ├── SevenZip ├── 7z.dll ├── 7z64.dll ├── ArchiveEmulationStreamProxy.cs ├── ArchiveExtractCallback.cs ├── ArchiveOpenCallback.cs ├── ArchiveUpdateCallback.cs ├── COM.cs ├── Common.cs ├── EventArgs.cs ├── Exceptions.cs ├── FileSignatureChecker.cs ├── Formats.cs ├── LibraryFeature.cs ├── LibraryManager.cs ├── LzmaDecodeStream.cs ├── LzmaEncodeStream.cs ├── LzmaProgressCallback.cs ├── NativeMethods.cs ├── Properties │ └── AssemblyInfo.cs ├── SevenZip.csproj ├── SevenZip.sln ├── SevenZip2010.csproj ├── SevenZip2010.sln ├── SevenZip2013.csproj ├── SevenZip2013.sln ├── SevenZipCompressor.cs ├── SevenZipCompressorAsynchronous.cs ├── SevenZipExtractor.cs ├── SevenZipExtractorAsynchronous.cs ├── SevenZipSfx.cs ├── StreamWrappers.cs ├── arch │ ├── Test.bzip2.7z │ ├── Test.lzma.7z │ ├── Test.lzma2.7z │ ├── Test.ppmd.7z │ ├── Test.rar │ ├── Test.tar │ ├── Test.txt │ ├── Test.txt.bz2 │ ├── Test.txt.gz │ ├── Test.txt.xz │ └── Test.zip ├── gpl.txt ├── lgpl.txt ├── sdk │ ├── Common │ │ ├── CRC.cs │ │ ├── InBuffer.cs │ │ └── OutBuffer.cs │ ├── Compress │ │ ├── LZ │ │ │ ├── IMatchFinder.cs │ │ │ ├── LzBinTree.cs │ │ │ ├── LzInWindow.cs │ │ │ └── LzOutWindow.cs │ │ ├── LZMA │ │ │ ├── LzmaBase.cs │ │ │ ├── LzmaDecoder.cs │ │ │ └── LzmaEncoder.cs │ │ └── RangeCoder │ │ │ ├── RangeCoder.cs │ │ │ ├── RangeCoderBit.cs │ │ │ └── RangeCoderBitTree.cs │ └── ICoder.cs └── sfx │ ├── 7z.sfx │ ├── 7zCon.sfx │ ├── 7zS.sfx │ ├── 7zSD.sfx │ ├── 7zxSD_All.sfx │ ├── 7zxSD_All_x64.sfx │ ├── 7zxSD_Deflate.sfx │ ├── 7zxSD_Deflate_x64.sfx │ ├── 7zxSD_LZMA.sfx │ ├── 7zxSD_LZMA2.sfx │ ├── 7zxSD_LZMA2_x64.sfx │ ├── 7zxSD_LZMA_x64.sfx │ ├── 7zxSD_PPMd.sfx │ ├── 7zxSD_PPMd_x64.sfx │ ├── Configs.xml │ ├── Configs.xsd │ ├── Configs.xslt │ └── sample.txt ├── SevenZipMono ├── AssemblyInfo.cs ├── Packages.mdproj ├── SevenZipMono.csproj ├── SevenZipMono.sln ├── SevenZipMonoTest │ ├── AssemblyInfo.cs │ ├── Main.cs │ └── SevenZipMonoTest.csproj ├── arch │ ├── Test.bzip2.7z │ ├── Test.lzma.7z │ ├── Test.lzma2.7z │ ├── Test.ppmd.7z │ ├── Test.rar │ ├── Test.tar │ ├── Test.txt │ ├── Test.txt.bz2 │ ├── Test.txt.gz │ ├── Test.txt.xz │ └── Test.zip └── sdk │ ├── Common │ ├── CRC.cs │ ├── InBuffer.cs │ └── OutBuffer.cs │ ├── Compress │ ├── LZ │ │ ├── IMatchFinder.cs │ │ ├── LzBinTree.cs │ │ ├── LzInWindow.cs │ │ └── LzOutWindow.cs │ ├── LZMA │ │ ├── LzmaBase.cs │ │ ├── LzmaDecoder.cs │ │ └── LzmaEncoder.cs │ └── RangeCoder │ │ ├── RangeCoder.cs │ │ ├── RangeCoderBit.cs │ │ └── RangeCoderBitTree.cs │ └── ICoder.cs ├── SevenZipSharpMobile ├── 7z.dll ├── OpenNetCF │ └── OpenNETCF.dll ├── Properties │ └── AssemblyInfo.cs ├── SevenZipSharpMobile.csproj ├── arch │ ├── Test.bzip2.7z │ ├── Test.lzma.7z │ ├── Test.lzma2.7z │ ├── Test.ppmd.7z │ ├── Test.rar │ ├── Test.tar │ ├── Test.txt │ ├── Test.txt.bz2 │ ├── Test.txt.gz │ ├── Test.txt.xz │ └── Test.zip ├── gpl.txt └── sdk │ ├── Common │ ├── CRC.cs │ ├── InBuffer.cs │ └── OutBuffer.cs │ ├── Compress │ ├── LZ │ │ ├── IMatchFinder.cs │ │ ├── LzBinTree.cs │ │ ├── LzInWindow.cs │ │ └── LzOutWindow.cs │ ├── LZMA │ │ ├── LzmaBase.cs │ │ ├── LzmaDecoder.cs │ │ └── LzmaEncoder.cs │ └── RangeCoder │ │ ├── RangeCoder.cs │ │ ├── RangeCoderBit.cs │ │ └── RangeCoderBitTree.cs │ └── ICoder.cs ├── SevenZipSharpMobileTest ├── FormMain.Designer.cs ├── FormMain.cs ├── FormMain.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── SevenZipSharpMobileTest.csproj └── gpl.7z ├── SevenZipTest ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── SevenZipTest.csproj ├── SevenZipTest2010.csproj ├── SevenZipTest2013.csproj └── app.config ├── SevenZipTestForms ├── FormMain.Designer.cs ├── FormMain.cs ├── FormMain.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings └── SevenZipTestForms.csproj └── SevenZipTestWPF ├── App.xaml ├── App.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── References ├── FolderBrowser.dll ├── Microsoft.WindowsAPICodePack.Shell.dll └── Microsoft.WindowsAPICodePack.dll ├── SevenZipTestWPF.csproj ├── SevenZipTestWPF2013.csproj └── app.config /.gitignore: -------------------------------------------------------------------------------- 1 | SevenZip/bin/ 2 | SevenZip/obj/ 3 | SevenZipTest/obj/ 4 | SevenZipTestWPF/bin/ 5 | SevenZipTestWPF/obj/ 6 | SevenZipTest/bin/ 7 | -------------------------------------------------------------------------------- /SevenZip/7z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/7z.dll -------------------------------------------------------------------------------- /SevenZip/7z64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/7z64.dll -------------------------------------------------------------------------------- /SevenZip/ArchiveEmulationStreamProxy.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System; 3 | 4 | namespace SevenZip 5 | { 6 | /// 7 | /// The Stream extension class to emulate the archive part of a stream. 8 | /// 9 | internal class ArchiveEmulationStreamProxy : Stream, IDisposable 10 | { 11 | /// 12 | /// Gets the file offset. 13 | /// 14 | public int Offset { get; private set; } 15 | 16 | /// 17 | /// The source wrapped stream. 18 | /// 19 | public Stream Source { get; private set; } 20 | 21 | /// 22 | /// Initializes a new instance of the ArchiveEmulationStream class. 23 | /// 24 | /// The stream to wrap. 25 | /// The stream offset. 26 | public ArchiveEmulationStreamProxy(Stream stream, int offset) 27 | { 28 | Source = stream; 29 | Offset = offset; 30 | Source.Position = offset; 31 | } 32 | 33 | public override bool CanRead 34 | { 35 | get { return Source.CanRead; } 36 | } 37 | 38 | public override bool CanSeek 39 | { 40 | get { return Source.CanSeek; } 41 | } 42 | 43 | public override bool CanWrite 44 | { 45 | get { return Source.CanWrite; } 46 | } 47 | 48 | public override void Flush() 49 | { 50 | Source.Flush(); 51 | } 52 | 53 | public override long Length 54 | { 55 | get { return Source.Length - Offset; } 56 | } 57 | 58 | public override long Position 59 | { 60 | get 61 | { 62 | return Source.Position - Offset; 63 | } 64 | set 65 | { 66 | Source.Position = value; 67 | } 68 | } 69 | 70 | public override int Read(byte[] buffer, int offset, int count) 71 | { 72 | return Source.Read(buffer, offset, count); 73 | } 74 | 75 | public override long Seek(long offset, SeekOrigin origin) 76 | { 77 | return Source.Seek(origin == SeekOrigin.Begin ? offset + Offset : offset, 78 | origin) - Offset; 79 | } 80 | 81 | public override void SetLength(long value) 82 | { 83 | Source.SetLength(value); 84 | } 85 | 86 | public override void Write(byte[] buffer, int offset, int count) 87 | { 88 | Source.Write(buffer, offset, count); 89 | } 90 | 91 | public new void Dispose() 92 | { 93 | Source.Dispose(); 94 | } 95 | 96 | public override void Close() 97 | { 98 | Source.Close(); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /SevenZip/LibraryFeature.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | 19 | namespace SevenZip 20 | { 21 | /// 22 | /// The set of features supported by the library. 23 | /// 24 | [Flags] 25 | [CLSCompliant(false)] 26 | public enum LibraryFeature : uint 27 | { 28 | /// 29 | /// Default feature. 30 | /// 31 | None = 0, 32 | /// 33 | /// The library can extract 7zip archives compressed with LZMA method. 34 | /// 35 | Extract7z = 0x1, 36 | /// 37 | /// The library can extract 7zip archives compressed with LZMA2 method. 38 | /// 39 | Extract7zLZMA2 = 0x2, 40 | /// 41 | /// The library can extract 7z archives compressed with all known methods. 42 | /// 43 | Extract7zAll = Extract7z|Extract7zLZMA2|0x4, 44 | /// 45 | /// The library can extract zip archives. 46 | /// 47 | ExtractZip = 0x8, 48 | /// 49 | /// The library can extract rar archives. 50 | /// 51 | ExtractRar = 0x10, 52 | /// 53 | /// The library can extract gzip archives. 54 | /// 55 | ExtractGzip = 0x20, 56 | /// 57 | /// The library can extract bzip2 archives. 58 | /// 59 | ExtractBzip2 = 0x40, 60 | /// 61 | /// The library can extract tar archives. 62 | /// 63 | ExtractTar = 0x80, 64 | /// 65 | /// The library can extract xz archives. 66 | /// 67 | ExtractXz = 0x100, 68 | /// 69 | /// The library can extract all types of archives supported. 70 | /// 71 | ExtractAll = Extract7zAll|ExtractZip|ExtractRar|ExtractGzip|ExtractBzip2|ExtractTar|ExtractXz, 72 | /// 73 | /// The library can compress data to 7zip archives with LZMA method. 74 | /// 75 | Compress7z = 0x200, 76 | /// 77 | /// The library can compress data to 7zip archives with LZMA2 method. 78 | /// 79 | Compress7zLZMA2 = 0x400, 80 | /// 81 | /// The library can compress data to 7zip archives with all methods known. 82 | /// 83 | Compress7zAll = Compress7z|Compress7zLZMA2|0x800, 84 | /// 85 | /// The library can compress data to tar archives. 86 | /// 87 | CompressTar = 0x1000, 88 | /// 89 | /// The library can compress data to gzip archives. 90 | /// 91 | CompressGzip = 0x2000, 92 | /// 93 | /// The library can compress data to bzip2 archives. 94 | /// 95 | CompressBzip2 = 0x4000, 96 | /// 97 | /// The library can compress data to xz archives. 98 | /// 99 | CompressXz = 0x8000, 100 | /// 101 | /// The library can compress data to zip archives. 102 | /// 103 | CompressZip = 0x10000, 104 | /// 105 | /// The library can compress data to all types of archives supported. 106 | /// 107 | CompressAll = Compress7zAll|CompressTar|CompressGzip|CompressBzip2|CompressXz|CompressZip, 108 | /// 109 | /// The library can modify archives. 110 | /// 111 | Modify = 0x20000 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /SevenZip/LzmaProgressCallback.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | using SevenZip.Sdk; 19 | 20 | namespace SevenZip 21 | { 22 | /// 23 | /// Callback to implement the ICodeProgress interface 24 | /// 25 | internal sealed class LzmaProgressCallback : ICodeProgress 26 | { 27 | private readonly long _inSize; 28 | private float _oldPercentDone; 29 | 30 | /// 31 | /// Initializes a new instance of the LzmaProgressCallback class 32 | /// 33 | /// The input size 34 | /// Progress event handler 35 | public LzmaProgressCallback(long inSize, EventHandler working) 36 | { 37 | _inSize = inSize; 38 | Working += working; 39 | } 40 | 41 | #region ICodeProgress Members 42 | 43 | /// 44 | /// Sets the progress 45 | /// 46 | /// The processed input size 47 | /// The processed output size 48 | public void SetProgress(long inSize, long outSize) 49 | { 50 | if (Working != null) 51 | { 52 | float newPercentDone = (inSize + 0.0f) / _inSize; 53 | float delta = newPercentDone - _oldPercentDone; 54 | if (delta * 100 < 1.0) 55 | { 56 | delta = 0; 57 | } 58 | else 59 | { 60 | _oldPercentDone = newPercentDone; 61 | } 62 | Working(this, new ProgressEventArgs( 63 | PercentDoneEventArgs.ProducePercentDone(newPercentDone), 64 | delta > 0 ? PercentDoneEventArgs.ProducePercentDone(delta) : (byte)0)); 65 | } 66 | } 67 | 68 | #endregion 69 | 70 | public event EventHandler Working; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /SevenZip/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | using System.Runtime.InteropServices; 19 | #if MONO 20 | using SevenZip.Mono.COM; 21 | #endif 22 | 23 | namespace SevenZip 24 | { 25 | #if UNMANAGED 26 | internal static class NativeMethods 27 | { 28 | #if !WINCE && !MONO 29 | #region Delegates 30 | 31 | [UnmanagedFunctionPointer(CallingConvention.StdCall)] 32 | public delegate int CreateObjectDelegate( 33 | [In] ref Guid classID, 34 | [In] ref Guid interfaceID, 35 | [MarshalAs(UnmanagedType.Interface)] out object outObject); 36 | 37 | #endregion 38 | 39 | [DllImport("kernel32.dll", BestFitMapping = false, ThrowOnUnmappableChar = true)] 40 | public static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string fileName); 41 | 42 | [DllImport("kernel32.dll")] 43 | [return: MarshalAs(UnmanagedType.Bool)] 44 | public static extern bool FreeLibrary(IntPtr hModule); 45 | 46 | [DllImport("kernel32.dll", BestFitMapping = false, ThrowOnUnmappableChar = true)] 47 | public static extern IntPtr GetProcAddress(IntPtr hModule, [MarshalAs(UnmanagedType.LPStr)] string procName); 48 | #endif 49 | 50 | #if WINCE 51 | [DllImport("7z.dll", EntryPoint="CreateObject")] 52 | public static extern int CreateCOMObject( 53 | [In] ref Guid classID, 54 | [In] ref Guid interfaceID, 55 | [MarshalAs(UnmanagedType.Interface)] out object outObject); 56 | #endif 57 | 58 | public static T SafeCast(PropVariant var, T def) 59 | { 60 | object obj; 61 | try 62 | { 63 | obj = var.Object; 64 | } 65 | catch (Exception) 66 | { 67 | return def; 68 | } 69 | if (obj != null && obj is T) 70 | { 71 | return (T) obj; 72 | } 73 | return def; 74 | } 75 | } 76 | #endif 77 | } -------------------------------------------------------------------------------- /SevenZip/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | using System; 17 | using System.Reflection; 18 | using System.Runtime.InteropServices; 19 | 20 | // General Information about an assembly is controlled through the following 21 | // set of attributes. Change these attribute values to modify the information 22 | // associated with an assembly. 23 | 24 | [assembly: AssemblyTitle("SevenZipSharp")] 25 | [assembly: AssemblyDescription("7-zip native library wrapper")] 26 | [assembly: AssemblyConfiguration("")] 27 | [assembly: AssemblyCompany("Markovtsev Vadim")] 28 | [assembly: AssemblyProduct("SevenZipSharp")] 29 | [assembly: AssemblyCopyright("Copyright (C) Markovtsev Vadim 2009, 2010, licenced under LGPLv3")] 30 | [assembly: AssemblyTrademark("")] 31 | [assembly: AssemblyCulture("")] 32 | [assembly: CLSCompliant(true)] 33 | 34 | // Setting ComVisible to false makes the types in this assembly not visible 35 | // to COM components. If you need to access a type in this assembly from 36 | // COM, set the ComVisible attribute to true on that type. 37 | 38 | [assembly: ComVisible(false)] 39 | 40 | // The following GUID is for the ID of the typelib if this project is exposed to COM 41 | 42 | [assembly: Guid("80ed772d-f5a7-4314-b5bb-2be78e5f5f06")] 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | 55 | [assembly: AssemblyVersion("0.65.*")] 56 | -------------------------------------------------------------------------------- /SevenZip/SevenZip2010.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZip2010", "SevenZip2010.csproj", "{4960DD14-3431-47EC-B9D9-9D2730A98DC3}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipTest2010", "..\SevenZipTest\SevenZipTest2010.csproj", "{B87AD11B-B701-496B-B48E-D1D963F2A336}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipTestWPF", "..\SevenZipTestWPF\SevenZipTestWPF.csproj", "{B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|Mixed Platforms = Debug|Mixed Platforms 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|Mixed Platforms = Release|Mixed Platforms 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 23 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 24 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|x86.ActiveCfg = Debug|Any CPU 25 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|x86.Build.0 = Debug|Any CPU 26 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 29 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Mixed Platforms.Build.0 = Release|Any CPU 30 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|x86.ActiveCfg = Release|Any CPU 31 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 34 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 35 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|x86.ActiveCfg = Debug|Any CPU 36 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|x86.Build.0 = Debug|Any CPU 37 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Any CPU.Build.0 = Release|Any CPU 39 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 40 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Mixed Platforms.Build.0 = Release|Any CPU 41 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|x86.ActiveCfg = Release|Any CPU 42 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Any CPU.ActiveCfg = Debug|x86 43 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 44 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Mixed Platforms.Build.0 = Debug|x86 45 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|x86.ActiveCfg = Debug|x86 46 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|x86.Build.0 = Debug|x86 47 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Any CPU.ActiveCfg = Release|x86 48 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Mixed Platforms.ActiveCfg = Release|x86 49 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Mixed Platforms.Build.0 = Release|x86 50 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|x86.ActiveCfg = Release|x86 51 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|x86.Build.0 = Release|x86 52 | EndGlobalSection 53 | GlobalSection(SolutionProperties) = preSolution 54 | HideSolutionNode = FALSE 55 | EndGlobalSection 56 | GlobalSection(NDepend) = preSolution 57 | Project = ".\SevenZip2010.ndproj" 58 | EndGlobalSection 59 | EndGlobal 60 | -------------------------------------------------------------------------------- /SevenZip/SevenZip2013.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZip2013", "SevenZip2013.csproj", "{4960DD14-3431-47EC-B9D9-9D2730A98DC3}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipTest2013", "..\SevenZipTest\SevenZipTest2013.csproj", "{B87AD11B-B701-496B-B48E-D1D963F2A336}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipTestWPF2013", "..\SevenZipTestWPF\SevenZipTestWPF2013.csproj", "{B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Debug|Mixed Platforms = Debug|Mixed Platforms 16 | Debug|x86 = Debug|x86 17 | Release|Any CPU = Release|Any CPU 18 | Release|Mixed Platforms = Release|Mixed Platforms 19 | Release|x86 = Release|x86 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 25 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 26 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|x86.ActiveCfg = Debug|Any CPU 27 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Debug|x86.Build.0 = Debug|Any CPU 28 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 31 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|Mixed Platforms.Build.0 = Release|Any CPU 32 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3}.Release|x86.ActiveCfg = Release|Any CPU 33 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 36 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 37 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|x86.ActiveCfg = Debug|Any CPU 38 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Debug|x86.Build.0 = Debug|Any CPU 39 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Any CPU.Build.0 = Release|Any CPU 41 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 42 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|Mixed Platforms.Build.0 = Release|Any CPU 43 | {B87AD11B-B701-496B-B48E-D1D963F2A336}.Release|x86.ActiveCfg = Release|Any CPU 44 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Any CPU.ActiveCfg = Debug|x86 45 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 46 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|Mixed Platforms.Build.0 = Debug|x86 47 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|x86.ActiveCfg = Debug|x86 48 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Debug|x86.Build.0 = Debug|x86 49 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Any CPU.ActiveCfg = Release|x86 50 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Mixed Platforms.ActiveCfg = Release|x86 51 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|Mixed Platforms.Build.0 = Release|x86 52 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|x86.ActiveCfg = Release|x86 53 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C}.Release|x86.Build.0 = Release|x86 54 | EndGlobalSection 55 | GlobalSection(SolutionProperties) = preSolution 56 | HideSolutionNode = FALSE 57 | EndGlobalSection 58 | GlobalSection(NDepend) = preSolution 59 | Project = ".\SevenZip2010.ndproj" 60 | EndGlobalSection 61 | EndGlobal 62 | -------------------------------------------------------------------------------- /SevenZip/arch/Test.bzip2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.bzip2.7z -------------------------------------------------------------------------------- /SevenZip/arch/Test.lzma.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.lzma.7z -------------------------------------------------------------------------------- /SevenZip/arch/Test.lzma2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.lzma2.7z -------------------------------------------------------------------------------- /SevenZip/arch/Test.ppmd.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.ppmd.7z -------------------------------------------------------------------------------- /SevenZip/arch/Test.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.rar -------------------------------------------------------------------------------- /SevenZip/arch/Test.tar: -------------------------------------------------------------------------------- 1 | Test.txt100777 0 0 4 11335207571 5573 0Test -------------------------------------------------------------------------------- /SevenZip/arch/Test.txt: -------------------------------------------------------------------------------- 1 | Test -------------------------------------------------------------------------------- /SevenZip/arch/Test.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.txt.bz2 -------------------------------------------------------------------------------- /SevenZip/arch/Test.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.txt.gz -------------------------------------------------------------------------------- /SevenZip/arch/Test.txt.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.txt.xz -------------------------------------------------------------------------------- /SevenZip/arch/Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/arch/Test.zip -------------------------------------------------------------------------------- /SevenZip/sdk/Common/CRC.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | namespace SevenZip.Sdk 18 | { 19 | internal class CRC 20 | { 21 | public static readonly uint[] Table; 22 | 23 | private uint _value = 0xFFFFFFFF; 24 | 25 | static CRC() 26 | { 27 | Table = new uint[256]; 28 | const uint kPoly = 0xEDB88320; 29 | for (uint i = 0; i < 256; i++) 30 | { 31 | uint r = i; 32 | for (int j = 0; j < 8; j++) 33 | if ((r & 1) != 0) 34 | r = (r >> 1) ^ kPoly; 35 | else 36 | r >>= 1; 37 | Table[i] = r; 38 | } 39 | } 40 | 41 | public void Init() 42 | { 43 | _value = 0xFFFFFFFF; 44 | } 45 | 46 | public void UpdateByte(byte b) 47 | { 48 | _value = Table[(((byte) (_value)) ^ b)] ^ (_value >> 8); 49 | } 50 | 51 | public void Update(byte[] data, uint offset, uint size) 52 | { 53 | for (uint i = 0; i < size; i++) 54 | _value = Table[(((byte) (_value)) ^ data[offset + i])] ^ (_value >> 8); 55 | } 56 | 57 | public uint GetDigest() 58 | { 59 | return _value ^ 0xFFFFFFFF; 60 | } 61 | 62 | private static uint CalculateDigest(byte[] data, uint offset, uint size) 63 | { 64 | var crc = new CRC(); 65 | // crc.Init(); 66 | crc.Update(data, offset, size); 67 | return crc.GetDigest(); 68 | } 69 | 70 | private static bool VerifyDigest(uint digest, byte[] data, uint offset, uint size) 71 | { 72 | return (CalculateDigest(data, offset, size) == digest); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Common/InBuffer.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Buffer 20 | { 21 | /// 22 | /// Implements the input buffer work 23 | /// 24 | internal class InBuffer 25 | { 26 | private readonly byte[] m_Buffer; 27 | private readonly uint m_BufferSize; 28 | private uint m_Limit; 29 | private uint m_Pos; 30 | private ulong m_ProcessedSize; 31 | private Stream m_Stream; 32 | private bool m_StreamWasExhausted; 33 | 34 | /// 35 | /// Initializes the input buffer 36 | /// 37 | /// 38 | private InBuffer(uint bufferSize) 39 | { 40 | m_Buffer = new byte[bufferSize]; 41 | m_BufferSize = bufferSize; 42 | } 43 | 44 | /// 45 | /// Initializes the class 46 | /// 47 | /// 48 | private void Init(Stream stream) 49 | { 50 | m_Stream = stream; 51 | m_ProcessedSize = 0; 52 | m_Limit = 0; 53 | m_Pos = 0; 54 | m_StreamWasExhausted = false; 55 | } 56 | 57 | /// 58 | /// Reads the whole block 59 | /// 60 | /// 61 | private bool ReadBlock() 62 | { 63 | if (m_StreamWasExhausted) 64 | return false; 65 | m_ProcessedSize += m_Pos; 66 | int aNumProcessedBytes = m_Stream.Read(m_Buffer, 0, (int) m_BufferSize); 67 | m_Pos = 0; 68 | m_Limit = (uint) aNumProcessedBytes; 69 | m_StreamWasExhausted = (aNumProcessedBytes == 0); 70 | return (!m_StreamWasExhausted); 71 | } 72 | 73 | /// 74 | /// Releases the stream 75 | /// 76 | private void ReleaseStream() 77 | { 78 | // m_Stream.Close(); 79 | m_Stream = null; 80 | } 81 | 82 | /// 83 | /// Reads the byte to check it 84 | /// 85 | /// 86 | /// 87 | private bool ReadByte(out byte b) 88 | { 89 | b = 0; 90 | if (m_Pos >= m_Limit) 91 | if (!ReadBlock()) 92 | return false; 93 | b = m_Buffer[m_Pos++]; 94 | return true; 95 | } 96 | 97 | /// 98 | /// Reads the next byte 99 | /// 100 | /// 101 | private byte ReadByte() 102 | { 103 | // return (byte)m_Stream.ReadByte(); 104 | if (m_Pos >= m_Limit) 105 | if (!ReadBlock()) 106 | return 0xFF; 107 | return m_Buffer[m_Pos++]; 108 | } 109 | 110 | /// 111 | /// Gets processed size 112 | /// 113 | /// 114 | private ulong GetProcessedSize() 115 | { 116 | return m_ProcessedSize + m_Pos; 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Common/OutBuffer.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Buffer 20 | { 21 | internal class OutBuffer 22 | { 23 | private readonly byte[] m_Buffer; 24 | private readonly uint m_BufferSize; 25 | private uint m_Pos; 26 | private ulong m_ProcessedSize; 27 | private Stream m_Stream; 28 | 29 | /// 30 | /// Initializes a new instance of the OutBuffer class 31 | /// 32 | /// 33 | public OutBuffer(uint bufferSize) 34 | { 35 | m_Buffer = new byte[bufferSize]; 36 | m_BufferSize = bufferSize; 37 | } 38 | 39 | public void SetStream(Stream stream) 40 | { 41 | m_Stream = stream; 42 | } 43 | 44 | public void FlushStream() 45 | { 46 | m_Stream.Flush(); 47 | } 48 | 49 | public void CloseStream() 50 | { 51 | m_Stream.Close(); 52 | } 53 | 54 | public void ReleaseStream() 55 | { 56 | m_Stream = null; 57 | } 58 | 59 | public void Init() 60 | { 61 | m_ProcessedSize = 0; 62 | m_Pos = 0; 63 | } 64 | 65 | public void WriteByte(byte b) 66 | { 67 | m_Buffer[m_Pos++] = b; 68 | if (m_Pos >= m_BufferSize) 69 | FlushData(); 70 | } 71 | 72 | public void FlushData() 73 | { 74 | if (m_Pos == 0) 75 | return; 76 | m_Stream.Write(m_Buffer, 0, (int) m_Pos); 77 | m_Pos = 0; 78 | } 79 | 80 | public ulong GetProcessedSize() 81 | { 82 | return m_ProcessedSize + m_Pos; 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Compress/LZ/IMatchFinder.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | using System.IO; 19 | 20 | namespace SevenZip.Sdk.Compression.LZ 21 | { 22 | internal interface IInWindowStream 23 | { 24 | void SetStream(Stream inStream); 25 | void Init(); 26 | void ReleaseStream(); 27 | Byte GetIndexByte(Int32 index); 28 | UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit); 29 | UInt32 GetNumAvailableBytes(); 30 | } 31 | 32 | internal interface IMatchFinder : IInWindowStream 33 | { 34 | void Create(UInt32 historySize, UInt32 keepAddBufferBefore, 35 | UInt32 matchMaxLen, UInt32 keepAddBufferAfter); 36 | 37 | UInt32 GetMatches(UInt32[] distances); 38 | void Skip(UInt32 num); 39 | } 40 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Compress/LZ/LzOutWindow.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Compression.LZ 20 | { 21 | internal class OutWindow 22 | { 23 | private byte[] _buffer; 24 | private uint _pos; 25 | private Stream _stream; 26 | private uint _streamPos; 27 | private uint _windowSize; 28 | public uint TrainSize; 29 | 30 | public void Create(uint windowSize) 31 | { 32 | if (_windowSize != windowSize) 33 | { 34 | // System.GC.Collect(); 35 | _buffer = new byte[windowSize]; 36 | } 37 | _windowSize = windowSize; 38 | _pos = 0; 39 | _streamPos = 0; 40 | } 41 | 42 | public void Init(Stream stream, bool solid) 43 | { 44 | ReleaseStream(); 45 | _stream = stream; 46 | if (!solid) 47 | { 48 | _streamPos = 0; 49 | _pos = 0; 50 | TrainSize = 0; 51 | } 52 | } 53 | 54 | public bool Train(Stream stream) 55 | { 56 | long len = stream.Length; 57 | uint size = (len < _windowSize) ? (uint) len : _windowSize; 58 | TrainSize = size; 59 | stream.Position = len - size; 60 | _streamPos = _pos = 0; 61 | while (size > 0) 62 | { 63 | uint curSize = _windowSize - _pos; 64 | if (size < curSize) 65 | curSize = size; 66 | int numReadBytes = stream.Read(_buffer, (int) _pos, (int) curSize); 67 | if (numReadBytes == 0) 68 | return false; 69 | size -= (uint) numReadBytes; 70 | _pos += (uint) numReadBytes; 71 | _streamPos += (uint) numReadBytes; 72 | if (_pos == _windowSize) 73 | _streamPos = _pos = 0; 74 | } 75 | return true; 76 | } 77 | 78 | public void ReleaseStream() 79 | { 80 | Flush(); 81 | _stream = null; 82 | } 83 | 84 | public void Flush() 85 | { 86 | uint size = _pos - _streamPos; 87 | if (size == 0) 88 | return; 89 | _stream.Write(_buffer, (int) _streamPos, (int) size); 90 | if (_pos >= _windowSize) 91 | _pos = 0; 92 | _streamPos = _pos; 93 | } 94 | 95 | public void CopyBlock(uint distance, uint len) 96 | { 97 | uint pos = _pos - distance - 1; 98 | if (pos >= _windowSize) 99 | pos += _windowSize; 100 | for (; len > 0; len--) 101 | { 102 | if (pos >= _windowSize) 103 | pos = 0; 104 | _buffer[_pos++] = _buffer[pos++]; 105 | if (_pos >= _windowSize) 106 | Flush(); 107 | } 108 | } 109 | 110 | public void PutByte(byte b) 111 | { 112 | _buffer[_pos++] = b; 113 | if (_pos >= _windowSize) 114 | Flush(); 115 | } 116 | 117 | public byte GetByte(uint distance) 118 | { 119 | uint pos = _pos - distance - 1; 120 | if (pos >= _windowSize) 121 | pos += _windowSize; 122 | return _buffer[pos]; 123 | } 124 | } 125 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Compress/LZMA/LzmaBase.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | namespace SevenZip.Sdk.Compression.Lzma 18 | { 19 | internal abstract class Base 20 | { 21 | public const uint kAlignMask = (kAlignTableSize - 1); 22 | public const uint kAlignTableSize = 1 << kNumAlignBits; 23 | public const int kDicLogSizeMin = 0; 24 | public const uint kEndPosModelIndex = 14; 25 | public const uint kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1; 26 | // public const int kDicLogSizeMax = 30; 27 | // public const uint kDistTableSizeMax = kDicLogSizeMax * 2; 28 | 29 | public const uint kMatchMinLen = 2; 30 | 31 | public const int kNumAlignBits = 4; 32 | 33 | public const uint kNumFullDistances = 1 << ((int) kEndPosModelIndex/2); 34 | public const int kNumHighLenBits = 8; 35 | 36 | public const uint kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols + 37 | (1 << kNumHighLenBits); 38 | 39 | public const uint kNumLenToPosStates = 1 << kNumLenToPosStatesBits; 40 | public const int kNumLenToPosStatesBits = 2; // it's for speed optimization 41 | 42 | public const uint kNumLitContextBitsMax = 8; 43 | public const uint kNumLitPosStatesBitsEncodingMax = 4; 44 | 45 | public const int kNumLowLenBits = 3; 46 | public const uint kNumLowLenSymbols = 1 << kNumLowLenBits; 47 | public const int kNumMidLenBits = 3; 48 | public const uint kNumMidLenSymbols = 1 << kNumMidLenBits; 49 | public const uint kNumPosModels = kEndPosModelIndex - kStartPosModelIndex; 50 | public const int kNumPosSlotBits = 6; 51 | public const int kNumPosStatesBitsEncodingMax = 4; 52 | public const int kNumPosStatesBitsMax = 4; 53 | public const uint kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax); 54 | public const uint kNumPosStatesMax = (1 << kNumPosStatesBitsMax); 55 | public const uint kNumRepDistances = 4; 56 | public const uint kNumStates = 12; 57 | public const uint kStartPosModelIndex = 4; 58 | 59 | public static uint GetLenToPosState(uint len) 60 | { 61 | len -= kMatchMinLen; 62 | if (len < kNumLenToPosStates) 63 | return len; 64 | return (kNumLenToPosStates - 1); 65 | } 66 | 67 | #region Nested type: State 68 | 69 | public struct State 70 | { 71 | public uint Index; 72 | 73 | public void Init() 74 | { 75 | Index = 0; 76 | } 77 | 78 | public void UpdateChar() 79 | { 80 | if (Index < 4) Index = 0; 81 | else if (Index < 10) Index -= 3; 82 | else Index -= 6; 83 | } 84 | 85 | public void UpdateMatch() 86 | { 87 | Index = (uint) (Index < 7 ? 7 : 10); 88 | } 89 | 90 | public void UpdateRep() 91 | { 92 | Index = (uint) (Index < 7 ? 8 : 11); 93 | } 94 | 95 | public void UpdateShortRep() 96 | { 97 | Index = (uint) (Index < 7 ? 9 : 11); 98 | } 99 | 100 | public bool IsCharState() 101 | { 102 | return Index < 7; 103 | } 104 | } 105 | 106 | #endregion 107 | } 108 | } -------------------------------------------------------------------------------- /SevenZip/sdk/Compress/RangeCoder/RangeCoderBit.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | 19 | namespace SevenZip.Sdk.Compression.RangeCoder 20 | { 21 | internal struct BitEncoder 22 | { 23 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 24 | public const int kNumBitModelTotalBits = 11; 25 | public const int kNumBitPriceShiftBits = 6; 26 | private const int kNumMoveBits = 5; 27 | private const int kNumMoveReducingBits = 2; 28 | private static readonly UInt32[] ProbPrices = new UInt32[kBitModelTotal >> kNumMoveReducingBits]; 29 | 30 | private uint Prob; 31 | 32 | static BitEncoder() 33 | { 34 | const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits); 35 | for (int i = kNumBits - 1; i >= 0; i--) 36 | { 37 | UInt32 start = (UInt32) 1 << (kNumBits - i - 1); 38 | UInt32 end = (UInt32) 1 << (kNumBits - i); 39 | for (UInt32 j = start; j < end; j++) 40 | ProbPrices[j] = ((UInt32) i << kNumBitPriceShiftBits) + 41 | (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1)); 42 | } 43 | } 44 | 45 | public void Init() 46 | { 47 | Prob = kBitModelTotal >> 1; 48 | } 49 | 50 | /*public void UpdateModel(uint symbol) 51 | { 52 | if (symbol == 0) 53 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 54 | else 55 | Prob -= (Prob) >> kNumMoveBits; 56 | }*/ 57 | 58 | public void Encode(Encoder encoder, uint symbol) 59 | { 60 | // encoder.EncodeBit(Prob, kNumBitModelTotalBits, symbol); 61 | // UpdateModel(symbol); 62 | uint newBound = (encoder.Range >> kNumBitModelTotalBits)*Prob; 63 | if (symbol == 0) 64 | { 65 | encoder.Range = newBound; 66 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 67 | } 68 | else 69 | { 70 | encoder.Low += newBound; 71 | encoder.Range -= newBound; 72 | Prob -= (Prob) >> kNumMoveBits; 73 | } 74 | if (encoder.Range < Encoder.kTopValue) 75 | { 76 | encoder.Range <<= 8; 77 | encoder.ShiftLow(); 78 | } 79 | } 80 | 81 | public uint GetPrice(uint symbol) 82 | { 83 | return ProbPrices[(((Prob - symbol) ^ ((-(int) symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; 84 | } 85 | 86 | public uint GetPrice0() 87 | { 88 | return ProbPrices[Prob >> kNumMoveReducingBits]; 89 | } 90 | 91 | public uint GetPrice1() 92 | { 93 | return ProbPrices[(kBitModelTotal - Prob) >> kNumMoveReducingBits]; 94 | } 95 | } 96 | 97 | internal struct BitDecoder 98 | { 99 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 100 | public const int kNumBitModelTotalBits = 11; 101 | private const int kNumMoveBits = 5; 102 | 103 | private uint Prob; 104 | 105 | /*public void UpdateModel(int numMoveBits, uint symbol) 106 | { 107 | if (symbol == 0) 108 | Prob += (kBitModelTotal - Prob) >> numMoveBits; 109 | else 110 | Prob -= (Prob) >> numMoveBits; 111 | }*/ 112 | 113 | public void Init() 114 | { 115 | Prob = kBitModelTotal >> 1; 116 | } 117 | 118 | public uint Decode(Decoder rangeDecoder) 119 | { 120 | uint newBound = (rangeDecoder.Range >> kNumBitModelTotalBits)*Prob; 121 | if (rangeDecoder.Code < newBound) 122 | { 123 | rangeDecoder.Range = newBound; 124 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 125 | if (rangeDecoder.Range < Decoder.kTopValue) 126 | { 127 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 128 | rangeDecoder.Range <<= 8; 129 | } 130 | return 0; 131 | } 132 | else 133 | { 134 | rangeDecoder.Range -= newBound; 135 | rangeDecoder.Code -= newBound; 136 | Prob -= (Prob) >> kNumMoveBits; 137 | if (rangeDecoder.Range < Decoder.kTopValue) 138 | { 139 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 140 | rangeDecoder.Range <<= 8; 141 | } 142 | return 1; 143 | } 144 | } 145 | } 146 | } -------------------------------------------------------------------------------- /SevenZip/sfx/7z.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7z.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zCon.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zCon.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zS.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zS.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zSD.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zSD.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_All.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_All.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_All_x64.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_All_x64.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_Deflate.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_Deflate.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_Deflate_x64.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_Deflate_x64.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_LZMA.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_LZMA.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_LZMA2.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_LZMA2.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_LZMA2_x64.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_LZMA2_x64.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_LZMA_x64.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_LZMA_x64.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_PPMd.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_PPMd.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/7zxSD_PPMd_x64.sfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZip/sfx/7zxSD_PPMd_x64.sfx -------------------------------------------------------------------------------- /SevenZip/sfx/Configs.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /SevenZip/sfx/Configs.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /SevenZip/sfx/Configs.xslt: -------------------------------------------------------------------------------- 1 |  2 | 4 | 5 | 6 | 7 | 7-Zip Sfx Configurations 8 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 40 | 41 | 42 | 45 | 48 | 49 | 50 | 51 | 52 | 53 |
21 |

22 | 23 |

24 |
CommandDescription
35 | 36 | 38 | 39 | 43 | 44 | 46 | 47 |
54 |
Applicable to modules: .
55 |
56 | 57 | 58 |
59 |
60 | -------------------------------------------------------------------------------- /SevenZip/sfx/sample.txt: -------------------------------------------------------------------------------- 1 | ;!@Install@!UTF-8! 2 | GUIMode="0" 3 | InstallPath="." 4 | GUIFlags="128+8" 5 | ExtractPathTitle="Hi!" 6 | ExtractPathText="Path" 7 | ;!@InstallEnd@! -------------------------------------------------------------------------------- /SevenZipMono/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("SevenZipMono")] 9 | [assembly: AssemblyDescription("SevenZipSharp Mono Build")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Markovtsev Vadim")] 12 | [assembly: AssemblyProduct("SevenZipSharp")] 13 | [assembly: AssemblyCopyright("Copyright © Markovtsev Vadim 2009, 2010, licenced under LGPLv3")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | [assembly: CLSCompliant(true)] 17 | 18 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 19 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 20 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 21 | 22 | [assembly: AssemblyVersion("0.63.*")] 23 | 24 | // The following attributes are used to specify the signing key for the assembly, 25 | // if desired. See the Mono documentation for more information about signing. 26 | 27 | [assembly: AssemblyDelaySign(false)] 28 | //[assembly: AssemblyKeyFile("")] 29 | -------------------------------------------------------------------------------- /SevenZipMono/Packages.mdproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PackagingProject 5 | 8.0.50727 6 | 2.0 7 | {048BF9B4-619E-4BF9-BEE4-CD4DA085E1E8} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /SevenZipMono/SevenZipMono.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1} 9 | Library 10 | SevenZipSharp 11 | SevenZipMono 12 | true 13 | SevenZip.snk 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG,UNMANAGED, COMPRESS, LZMA_STREAM, MONO, DOTNET20 21 | prompt 22 | 4 23 | false 24 | 25 | 26 | none 27 | true 28 | bin\Release 29 | prompt 30 | 4 31 | false 32 | UNMANAGED, COMPRESS, LZMA_STREAM, MONO, DOTNET20 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | SevenZipCompressorAsynchronous.cs 76 | 77 | 78 | SevenZipExtractorAsynchronous.cs 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /SevenZipMono/SevenZipMono.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipMono", "SevenZipMono.csproj", "{045ACB46-E27F-4D0F-8B89-7810A8D83DF1}" 5 | EndProject 6 | Project("{9344bdbb-3e7f-41fc-a0dd-8665d75ee146}") = "Packages", "Packages.mdproj", "{048BF9B4-619E-4BF9-BEE4-CD4DA085E1E8}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SevenZipMonoTest", "SevenZipMonoTest\SevenZipMonoTest.csproj", "{EE68A1FE-4906-4E71-A75A-2D58C0BC1324}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {048BF9B4-619E-4BF9-BEE4-CD4DA085E1E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {048BF9B4-619E-4BF9-BEE4-CD4DA085E1E8}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {EE68A1FE-4906-4E71-A75A-2D58C0BC1324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {EE68A1FE-4906-4E71-A75A-2D58C0BC1324}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {EE68A1FE-4906-4E71-A75A-2D58C0BC1324}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {EE68A1FE-4906-4E71-A75A-2D58C0BC1324}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(MonoDevelopProperties) = preSolution 28 | StartupItem = SevenZipMonoTest\SevenZipMonoTest.csproj 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /SevenZipMono/SevenZipMonoTest/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("SevenZipMonoTest")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | [assembly: AssemblyDelaySign(false)] 26 | [assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /SevenZipMono/SevenZipMonoTest/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using SevenZip; 3 | 4 | namespace SevenZipMonoTest 5 | { 6 | class MainClass 7 | { 8 | public static void Main(string[] args) 9 | { 10 | var features = SevenZipExtractor.CurrentLibraryFeatures; 11 | Console.WriteLine(((uint)features).ToString("X6")); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /SevenZipMono/SevenZipMonoTest/SevenZipMonoTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {EE68A1FE-4906-4E71-A75A-2D58C0BC1324} 9 | Exe 10 | SevenZipMonoTest 11 | SevenZipMonoTest 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\Debug 18 | DEBUG 19 | prompt 20 | 4 21 | 22 | 23 | none 24 | false 25 | bin\Release 26 | prompt 27 | 4 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | {045ACB46-E27F-4D0F-8B89-7810A8D83DF1} 39 | SevenZipMono 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.bzip2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.bzip2.7z -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.lzma.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.lzma.7z -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.lzma2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.lzma2.7z -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.ppmd.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.ppmd.7z -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.rar -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.tar: -------------------------------------------------------------------------------- 1 | Test.txt100777 0 0 4 11335207571 5573 0Test -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.txt: -------------------------------------------------------------------------------- 1 | Test -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.txt.bz2 -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.txt.gz -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.txt.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.txt.xz -------------------------------------------------------------------------------- /SevenZipMono/arch/Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipMono/arch/Test.zip -------------------------------------------------------------------------------- /SevenZipMono/sdk/Common/CRC.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | namespace SevenZip.Sdk 18 | { 19 | internal class CRC 20 | { 21 | public static readonly uint[] Table; 22 | 23 | private uint _value = 0xFFFFFFFF; 24 | 25 | static CRC() 26 | { 27 | Table = new uint[256]; 28 | const uint kPoly = 0xEDB88320; 29 | for (uint i = 0; i < 256; i++) 30 | { 31 | uint r = i; 32 | for (int j = 0; j < 8; j++) 33 | if ((r & 1) != 0) 34 | r = (r >> 1) ^ kPoly; 35 | else 36 | r >>= 1; 37 | Table[i] = r; 38 | } 39 | } 40 | 41 | public void Init() 42 | { 43 | _value = 0xFFFFFFFF; 44 | } 45 | 46 | public void UpdateByte(byte b) 47 | { 48 | _value = Table[(((byte) (_value)) ^ b)] ^ (_value >> 8); 49 | } 50 | 51 | public void Update(byte[] data, uint offset, uint size) 52 | { 53 | for (uint i = 0; i < size; i++) 54 | _value = Table[(((byte) (_value)) ^ data[offset + i])] ^ (_value >> 8); 55 | } 56 | 57 | public uint GetDigest() 58 | { 59 | return _value ^ 0xFFFFFFFF; 60 | } 61 | 62 | private static uint CalculateDigest(byte[] data, uint offset, uint size) 63 | { 64 | var crc = new CRC(); 65 | // crc.Init(); 66 | crc.Update(data, offset, size); 67 | return crc.GetDigest(); 68 | } 69 | 70 | private static bool VerifyDigest(uint digest, byte[] data, uint offset, uint size) 71 | { 72 | return (CalculateDigest(data, offset, size) == digest); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Common/InBuffer.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Buffer 20 | { 21 | /// 22 | /// Implements the input buffer work 23 | /// 24 | internal class InBuffer 25 | { 26 | private readonly byte[] m_Buffer; 27 | private readonly uint m_BufferSize; 28 | private uint m_Limit; 29 | private uint m_Pos; 30 | private ulong m_ProcessedSize; 31 | private Stream m_Stream; 32 | private bool m_StreamWasExhausted; 33 | 34 | /// 35 | /// Initializes the input buffer 36 | /// 37 | /// 38 | private InBuffer(uint bufferSize) 39 | { 40 | m_Buffer = new byte[bufferSize]; 41 | m_BufferSize = bufferSize; 42 | } 43 | 44 | /// 45 | /// Initializes the class 46 | /// 47 | /// 48 | private void Init(Stream stream) 49 | { 50 | m_Stream = stream; 51 | m_ProcessedSize = 0; 52 | m_Limit = 0; 53 | m_Pos = 0; 54 | m_StreamWasExhausted = false; 55 | } 56 | 57 | /// 58 | /// Reads the whole block 59 | /// 60 | /// 61 | private bool ReadBlock() 62 | { 63 | if (m_StreamWasExhausted) 64 | return false; 65 | m_ProcessedSize += m_Pos; 66 | int aNumProcessedBytes = m_Stream.Read(m_Buffer, 0, (int) m_BufferSize); 67 | m_Pos = 0; 68 | m_Limit = (uint) aNumProcessedBytes; 69 | m_StreamWasExhausted = (aNumProcessedBytes == 0); 70 | return (!m_StreamWasExhausted); 71 | } 72 | 73 | /// 74 | /// Releases the stream 75 | /// 76 | private void ReleaseStream() 77 | { 78 | // m_Stream.Close(); 79 | m_Stream = null; 80 | } 81 | 82 | /// 83 | /// Reads the byte to check it 84 | /// 85 | /// 86 | /// 87 | private bool ReadByte(out byte b) 88 | { 89 | b = 0; 90 | if (m_Pos >= m_Limit) 91 | if (!ReadBlock()) 92 | return false; 93 | b = m_Buffer[m_Pos++]; 94 | return true; 95 | } 96 | 97 | /// 98 | /// Reads the next byte 99 | /// 100 | /// 101 | private byte ReadByte() 102 | { 103 | // return (byte)m_Stream.ReadByte(); 104 | if (m_Pos >= m_Limit) 105 | if (!ReadBlock()) 106 | return 0xFF; 107 | return m_Buffer[m_Pos++]; 108 | } 109 | 110 | /// 111 | /// Gets processed size 112 | /// 113 | /// 114 | private ulong GetProcessedSize() 115 | { 116 | return m_ProcessedSize + m_Pos; 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Common/OutBuffer.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Buffer 20 | { 21 | internal class OutBuffer 22 | { 23 | private readonly byte[] m_Buffer; 24 | private readonly uint m_BufferSize; 25 | private uint m_Pos; 26 | private ulong m_ProcessedSize; 27 | private Stream m_Stream; 28 | 29 | /// 30 | /// Initializes a new instance of the OutBuffer class 31 | /// 32 | /// 33 | public OutBuffer(uint bufferSize) 34 | { 35 | m_Buffer = new byte[bufferSize]; 36 | m_BufferSize = bufferSize; 37 | } 38 | 39 | public void SetStream(Stream stream) 40 | { 41 | m_Stream = stream; 42 | } 43 | 44 | public void FlushStream() 45 | { 46 | m_Stream.Flush(); 47 | } 48 | 49 | public void CloseStream() 50 | { 51 | m_Stream.Close(); 52 | } 53 | 54 | public void ReleaseStream() 55 | { 56 | m_Stream = null; 57 | } 58 | 59 | public void Init() 60 | { 61 | m_ProcessedSize = 0; 62 | m_Pos = 0; 63 | } 64 | 65 | public void WriteByte(byte b) 66 | { 67 | m_Buffer[m_Pos++] = b; 68 | if (m_Pos >= m_BufferSize) 69 | FlushData(); 70 | } 71 | 72 | public void FlushData() 73 | { 74 | if (m_Pos == 0) 75 | return; 76 | m_Stream.Write(m_Buffer, 0, (int) m_Pos); 77 | m_Pos = 0; 78 | } 79 | 80 | public ulong GetProcessedSize() 81 | { 82 | return m_ProcessedSize + m_Pos; 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Compress/LZ/IMatchFinder.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | using System.IO; 19 | 20 | namespace SevenZip.Sdk.Compression.LZ 21 | { 22 | internal interface IInWindowStream 23 | { 24 | void SetStream(Stream inStream); 25 | void Init(); 26 | void ReleaseStream(); 27 | Byte GetIndexByte(Int32 index); 28 | UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit); 29 | UInt32 GetNumAvailableBytes(); 30 | } 31 | 32 | internal interface IMatchFinder : IInWindowStream 33 | { 34 | void Create(UInt32 historySize, UInt32 keepAddBufferBefore, 35 | UInt32 matchMaxLen, UInt32 keepAddBufferAfter); 36 | 37 | UInt32 GetMatches(UInt32[] distances); 38 | void Skip(UInt32 num); 39 | } 40 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Compress/LZ/LzOutWindow.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System.IO; 18 | 19 | namespace SevenZip.Sdk.Compression.LZ 20 | { 21 | internal class OutWindow 22 | { 23 | private byte[] _buffer; 24 | private uint _pos; 25 | private Stream _stream; 26 | private uint _streamPos; 27 | private uint _windowSize; 28 | public uint TrainSize; 29 | 30 | public void Create(uint windowSize) 31 | { 32 | if (_windowSize != windowSize) 33 | { 34 | // System.GC.Collect(); 35 | _buffer = new byte[windowSize]; 36 | } 37 | _windowSize = windowSize; 38 | _pos = 0; 39 | _streamPos = 0; 40 | } 41 | 42 | public void Init(Stream stream, bool solid) 43 | { 44 | ReleaseStream(); 45 | _stream = stream; 46 | if (!solid) 47 | { 48 | _streamPos = 0; 49 | _pos = 0; 50 | TrainSize = 0; 51 | } 52 | } 53 | 54 | public bool Train(Stream stream) 55 | { 56 | long len = stream.Length; 57 | uint size = (len < _windowSize) ? (uint) len : _windowSize; 58 | TrainSize = size; 59 | stream.Position = len - size; 60 | _streamPos = _pos = 0; 61 | while (size > 0) 62 | { 63 | uint curSize = _windowSize - _pos; 64 | if (size < curSize) 65 | curSize = size; 66 | int numReadBytes = stream.Read(_buffer, (int) _pos, (int) curSize); 67 | if (numReadBytes == 0) 68 | return false; 69 | size -= (uint) numReadBytes; 70 | _pos += (uint) numReadBytes; 71 | _streamPos += (uint) numReadBytes; 72 | if (_pos == _windowSize) 73 | _streamPos = _pos = 0; 74 | } 75 | return true; 76 | } 77 | 78 | public void ReleaseStream() 79 | { 80 | Flush(); 81 | _stream = null; 82 | } 83 | 84 | public void Flush() 85 | { 86 | uint size = _pos - _streamPos; 87 | if (size == 0) 88 | return; 89 | _stream.Write(_buffer, (int) _streamPos, (int) size); 90 | if (_pos >= _windowSize) 91 | _pos = 0; 92 | _streamPos = _pos; 93 | } 94 | 95 | public void CopyBlock(uint distance, uint len) 96 | { 97 | uint pos = _pos - distance - 1; 98 | if (pos >= _windowSize) 99 | pos += _windowSize; 100 | for (; len > 0; len--) 101 | { 102 | if (pos >= _windowSize) 103 | pos = 0; 104 | _buffer[_pos++] = _buffer[pos++]; 105 | if (_pos >= _windowSize) 106 | Flush(); 107 | } 108 | } 109 | 110 | public void PutByte(byte b) 111 | { 112 | _buffer[_pos++] = b; 113 | if (_pos >= _windowSize) 114 | Flush(); 115 | } 116 | 117 | public byte GetByte(uint distance) 118 | { 119 | uint pos = _pos - distance - 1; 120 | if (pos >= _windowSize) 121 | pos += _windowSize; 122 | return _buffer[pos]; 123 | } 124 | } 125 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Compress/LZMA/LzmaBase.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | namespace SevenZip.Sdk.Compression.Lzma 18 | { 19 | internal abstract class Base 20 | { 21 | public const uint kAlignMask = (kAlignTableSize - 1); 22 | public const uint kAlignTableSize = 1 << kNumAlignBits; 23 | public const int kDicLogSizeMin = 0; 24 | public const uint kEndPosModelIndex = 14; 25 | public const uint kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1; 26 | // public const int kDicLogSizeMax = 30; 27 | // public const uint kDistTableSizeMax = kDicLogSizeMax * 2; 28 | 29 | public const uint kMatchMinLen = 2; 30 | 31 | public const int kNumAlignBits = 4; 32 | 33 | public const uint kNumFullDistances = 1 << ((int) kEndPosModelIndex/2); 34 | public const int kNumHighLenBits = 8; 35 | 36 | public const uint kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols + 37 | (1 << kNumHighLenBits); 38 | 39 | public const uint kNumLenToPosStates = 1 << kNumLenToPosStatesBits; 40 | public const int kNumLenToPosStatesBits = 2; // it's for speed optimization 41 | 42 | public const uint kNumLitContextBitsMax = 8; 43 | public const uint kNumLitPosStatesBitsEncodingMax = 4; 44 | 45 | public const int kNumLowLenBits = 3; 46 | public const uint kNumLowLenSymbols = 1 << kNumLowLenBits; 47 | public const int kNumMidLenBits = 3; 48 | public const uint kNumMidLenSymbols = 1 << kNumMidLenBits; 49 | public const uint kNumPosModels = kEndPosModelIndex - kStartPosModelIndex; 50 | public const int kNumPosSlotBits = 6; 51 | public const int kNumPosStatesBitsEncodingMax = 4; 52 | public const int kNumPosStatesBitsMax = 4; 53 | public const uint kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax); 54 | public const uint kNumPosStatesMax = (1 << kNumPosStatesBitsMax); 55 | public const uint kNumRepDistances = 4; 56 | public const uint kNumStates = 12; 57 | public const uint kStartPosModelIndex = 4; 58 | 59 | public static uint GetLenToPosState(uint len) 60 | { 61 | len -= kMatchMinLen; 62 | if (len < kNumLenToPosStates) 63 | return len; 64 | return (kNumLenToPosStates - 1); 65 | } 66 | 67 | #region Nested type: State 68 | 69 | public struct State 70 | { 71 | public uint Index; 72 | 73 | public void Init() 74 | { 75 | Index = 0; 76 | } 77 | 78 | public void UpdateChar() 79 | { 80 | if (Index < 4) Index = 0; 81 | else if (Index < 10) Index -= 3; 82 | else Index -= 6; 83 | } 84 | 85 | public void UpdateMatch() 86 | { 87 | Index = (uint) (Index < 7 ? 7 : 10); 88 | } 89 | 90 | public void UpdateRep() 91 | { 92 | Index = (uint) (Index < 7 ? 8 : 11); 93 | } 94 | 95 | public void UpdateShortRep() 96 | { 97 | Index = (uint) (Index < 7 ? 9 : 11); 98 | } 99 | 100 | public bool IsCharState() 101 | { 102 | return Index < 7; 103 | } 104 | } 105 | 106 | #endregion 107 | } 108 | } -------------------------------------------------------------------------------- /SevenZipMono/sdk/Compress/RangeCoder/RangeCoderBit.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | 19 | namespace SevenZip.Sdk.Compression.RangeCoder 20 | { 21 | internal struct BitEncoder 22 | { 23 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 24 | public const int kNumBitModelTotalBits = 11; 25 | public const int kNumBitPriceShiftBits = 6; 26 | private const int kNumMoveBits = 5; 27 | private const int kNumMoveReducingBits = 2; 28 | private static readonly UInt32[] ProbPrices = new UInt32[kBitModelTotal >> kNumMoveReducingBits]; 29 | 30 | private uint Prob; 31 | 32 | static BitEncoder() 33 | { 34 | const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits); 35 | for (int i = kNumBits - 1; i >= 0; i--) 36 | { 37 | UInt32 start = (UInt32) 1 << (kNumBits - i - 1); 38 | UInt32 end = (UInt32) 1 << (kNumBits - i); 39 | for (UInt32 j = start; j < end; j++) 40 | ProbPrices[j] = ((UInt32) i << kNumBitPriceShiftBits) + 41 | (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1)); 42 | } 43 | } 44 | 45 | public void Init() 46 | { 47 | Prob = kBitModelTotal >> 1; 48 | } 49 | 50 | /*public void UpdateModel(uint symbol) 51 | { 52 | if (symbol == 0) 53 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 54 | else 55 | Prob -= (Prob) >> kNumMoveBits; 56 | }*/ 57 | 58 | public void Encode(Encoder encoder, uint symbol) 59 | { 60 | // encoder.EncodeBit(Prob, kNumBitModelTotalBits, symbol); 61 | // UpdateModel(symbol); 62 | uint newBound = (encoder.Range >> kNumBitModelTotalBits)*Prob; 63 | if (symbol == 0) 64 | { 65 | encoder.Range = newBound; 66 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 67 | } 68 | else 69 | { 70 | encoder.Low += newBound; 71 | encoder.Range -= newBound; 72 | Prob -= (Prob) >> kNumMoveBits; 73 | } 74 | if (encoder.Range < Encoder.kTopValue) 75 | { 76 | encoder.Range <<= 8; 77 | encoder.ShiftLow(); 78 | } 79 | } 80 | 81 | public uint GetPrice(uint symbol) 82 | { 83 | return ProbPrices[(((Prob - symbol) ^ ((-(int) symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; 84 | } 85 | 86 | public uint GetPrice0() 87 | { 88 | return ProbPrices[Prob >> kNumMoveReducingBits]; 89 | } 90 | 91 | public uint GetPrice1() 92 | { 93 | return ProbPrices[(kBitModelTotal - Prob) >> kNumMoveReducingBits]; 94 | } 95 | } 96 | 97 | internal struct BitDecoder 98 | { 99 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 100 | public const int kNumBitModelTotalBits = 11; 101 | private const int kNumMoveBits = 5; 102 | 103 | private uint Prob; 104 | 105 | /*public void UpdateModel(int numMoveBits, uint symbol) 106 | { 107 | if (symbol == 0) 108 | Prob += (kBitModelTotal - Prob) >> numMoveBits; 109 | else 110 | Prob -= (Prob) >> numMoveBits; 111 | }*/ 112 | 113 | public void Init() 114 | { 115 | Prob = kBitModelTotal >> 1; 116 | } 117 | 118 | public uint Decode(Decoder rangeDecoder) 119 | { 120 | uint newBound = (rangeDecoder.Range >> kNumBitModelTotalBits)*Prob; 121 | if (rangeDecoder.Code < newBound) 122 | { 123 | rangeDecoder.Range = newBound; 124 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 125 | if (rangeDecoder.Range < Decoder.kTopValue) 126 | { 127 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 128 | rangeDecoder.Range <<= 8; 129 | } 130 | return 0; 131 | } 132 | else 133 | { 134 | rangeDecoder.Range -= newBound; 135 | rangeDecoder.Code -= newBound; 136 | Prob -= (Prob) >> kNumMoveBits; 137 | if (rangeDecoder.Range < Decoder.kTopValue) 138 | { 139 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 140 | rangeDecoder.Range <<= 8; 141 | } 142 | return 1; 143 | } 144 | } 145 | } 146 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/7z.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/7z.dll -------------------------------------------------------------------------------- /SevenZipSharpMobile/OpenNetCF/OpenNETCF.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/OpenNetCF/OpenNETCF.dll -------------------------------------------------------------------------------- /SevenZipSharpMobile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("SevenZipSharpMobile")] 10 | [assembly: AssemblyDescription("7-zip native library wrapper for Windows Mobile")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("Markovtsev Vadim")] 13 | [assembly: AssemblyProduct("SevenZipSharp")] 14 | [assembly: AssemblyCopyright("Copyright © Markovtsev Vadim 2010, licenced under GPLv3")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: CLSCompliant(true)] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | [assembly: Guid("0ab91ed0-bd7e-413e-975c-f6d9a3713aed")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Revision and Build Numbers 35 | // by using the '*' as shown below: 36 | [assembly: AssemblyVersion("0.64.*")] 37 | 38 | -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.bzip2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.bzip2.7z -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.lzma.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.lzma.7z -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.lzma2.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.lzma2.7z -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.ppmd.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.ppmd.7z -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.rar -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.tar: -------------------------------------------------------------------------------- 1 | Test.txt100777 0 0 4 11335207571 5573 0Test -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.txt: -------------------------------------------------------------------------------- 1 | Test -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.txt.bz2 -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.txt.gz -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.txt.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.txt.xz -------------------------------------------------------------------------------- /SevenZipSharpMobile/arch/Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobile/arch/Test.zip -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Common/CRC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | namespace SevenZip.Sdk 19 | { 20 | internal class CRC 21 | { 22 | public static readonly uint[] Table; 23 | 24 | private uint _value = 0xFFFFFFFF; 25 | 26 | static CRC() 27 | { 28 | Table = new uint[256]; 29 | const uint kPoly = 0xEDB88320; 30 | for (uint i = 0; i < 256; i++) 31 | { 32 | uint r = i; 33 | for (int j = 0; j < 8; j++) 34 | if ((r & 1) != 0) 35 | r = (r >> 1) ^ kPoly; 36 | else 37 | r >>= 1; 38 | Table[i] = r; 39 | } 40 | } 41 | 42 | public void Init() 43 | { 44 | _value = 0xFFFFFFFF; 45 | } 46 | 47 | public void UpdateByte(byte b) 48 | { 49 | _value = Table[(((byte) (_value)) ^ b)] ^ (_value >> 8); 50 | } 51 | 52 | public void Update(byte[] data, uint offset, uint size) 53 | { 54 | for (uint i = 0; i < size; i++) 55 | _value = Table[(((byte) (_value)) ^ data[offset + i])] ^ (_value >> 8); 56 | } 57 | 58 | public uint GetDigest() 59 | { 60 | return _value ^ 0xFFFFFFFF; 61 | } 62 | 63 | private static uint CalculateDigest(byte[] data, uint offset, uint size) 64 | { 65 | var crc = new CRC(); 66 | // crc.Init(); 67 | crc.Update(data, offset, size); 68 | return crc.GetDigest(); 69 | } 70 | 71 | private static bool VerifyDigest(uint digest, byte[] data, uint offset, uint size) 72 | { 73 | return (CalculateDigest(data, offset, size) == digest); 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Common/InBuffer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | using System.IO; 19 | 20 | namespace SevenZip.Sdk.Buffer 21 | { 22 | /// 23 | /// Implements the input buffer work 24 | /// 25 | internal class InBuffer 26 | { 27 | private readonly byte[] m_Buffer; 28 | private readonly uint m_BufferSize; 29 | private uint m_Limit; 30 | private uint m_Pos; 31 | private ulong m_ProcessedSize; 32 | private Stream m_Stream; 33 | private bool m_StreamWasExhausted; 34 | 35 | /// 36 | /// Initializes the input buffer 37 | /// 38 | /// 39 | private InBuffer(uint bufferSize) 40 | { 41 | m_Buffer = new byte[bufferSize]; 42 | m_BufferSize = bufferSize; 43 | } 44 | 45 | /// 46 | /// Initializes the class 47 | /// 48 | /// 49 | private void Init(Stream stream) 50 | { 51 | m_Stream = stream; 52 | m_ProcessedSize = 0; 53 | m_Limit = 0; 54 | m_Pos = 0; 55 | m_StreamWasExhausted = false; 56 | } 57 | 58 | /// 59 | /// Reads the whole block 60 | /// 61 | /// 62 | private bool ReadBlock() 63 | { 64 | if (m_StreamWasExhausted) 65 | return false; 66 | m_ProcessedSize += m_Pos; 67 | int aNumProcessedBytes = m_Stream.Read(m_Buffer, 0, (int) m_BufferSize); 68 | m_Pos = 0; 69 | m_Limit = (uint) aNumProcessedBytes; 70 | m_StreamWasExhausted = (aNumProcessedBytes == 0); 71 | return (!m_StreamWasExhausted); 72 | } 73 | 74 | /// 75 | /// Releases the stream 76 | /// 77 | private void ReleaseStream() 78 | { 79 | // m_Stream.Close(); 80 | m_Stream = null; 81 | } 82 | 83 | /// 84 | /// Reads the byte to check it 85 | /// 86 | /// 87 | /// 88 | private bool ReadByte(out byte b) 89 | { 90 | b = 0; 91 | if (m_Pos >= m_Limit) 92 | if (!ReadBlock()) 93 | return false; 94 | b = m_Buffer[m_Pos++]; 95 | return true; 96 | } 97 | 98 | /// 99 | /// Reads the next byte 100 | /// 101 | /// 102 | private byte ReadByte() 103 | { 104 | // return (byte)m_Stream.ReadByte(); 105 | if (m_Pos >= m_Limit) 106 | if (!ReadBlock()) 107 | return 0xFF; 108 | return m_Buffer[m_Pos++]; 109 | } 110 | 111 | /// 112 | /// Gets processed size 113 | /// 114 | /// 115 | private ulong GetProcessedSize() 116 | { 117 | return m_ProcessedSize + m_Pos; 118 | } 119 | } 120 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Common/OutBuffer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | using System.IO; 19 | 20 | namespace SevenZip.Sdk.Buffer 21 | { 22 | internal class OutBuffer 23 | { 24 | private readonly byte[] m_Buffer; 25 | private readonly uint m_BufferSize; 26 | private uint m_Pos; 27 | private ulong m_ProcessedSize; 28 | private Stream m_Stream; 29 | 30 | /// 31 | /// Initializes a new instance of the OutBuffer class 32 | /// 33 | /// 34 | public OutBuffer(uint bufferSize) 35 | { 36 | m_Buffer = new byte[bufferSize]; 37 | m_BufferSize = bufferSize; 38 | } 39 | 40 | public void SetStream(Stream stream) 41 | { 42 | m_Stream = stream; 43 | } 44 | 45 | public void FlushStream() 46 | { 47 | m_Stream.Flush(); 48 | } 49 | 50 | public void CloseStream() 51 | { 52 | m_Stream.Close(); 53 | } 54 | 55 | public void ReleaseStream() 56 | { 57 | m_Stream = null; 58 | } 59 | 60 | public void Init() 61 | { 62 | m_ProcessedSize = 0; 63 | m_Pos = 0; 64 | } 65 | 66 | public void WriteByte(byte b) 67 | { 68 | m_Buffer[m_Pos++] = b; 69 | if (m_Pos >= m_BufferSize) 70 | FlushData(); 71 | } 72 | 73 | public void FlushData() 74 | { 75 | if (m_Pos == 0) 76 | return; 77 | m_Stream.Write(m_Buffer, 0, (int) m_Pos); 78 | m_Pos = 0; 79 | } 80 | 81 | public ulong GetProcessedSize() 82 | { 83 | return m_ProcessedSize + m_Pos; 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Compress/LZ/IMatchFinder.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.IO; 20 | 21 | namespace SevenZip.Sdk.Compression.LZ 22 | { 23 | internal interface IInWindowStream 24 | { 25 | void SetStream(Stream inStream); 26 | void Init(); 27 | void ReleaseStream(); 28 | Byte GetIndexByte(Int32 index); 29 | UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit); 30 | UInt32 GetNumAvailableBytes(); 31 | } 32 | 33 | internal interface IMatchFinder : IInWindowStream 34 | { 35 | void Create(UInt32 historySize, UInt32 keepAddBufferBefore, 36 | UInt32 matchMaxLen, UInt32 keepAddBufferAfter); 37 | 38 | UInt32 GetMatches(UInt32[] distances); 39 | void Skip(UInt32 num); 40 | } 41 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Compress/LZ/LzOutWindow.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | using System.IO; 19 | 20 | namespace SevenZip.Sdk.Compression.LZ 21 | { 22 | internal class OutWindow 23 | { 24 | private byte[] _buffer; 25 | private uint _pos; 26 | private Stream _stream; 27 | private uint _streamPos; 28 | private uint _windowSize; 29 | public uint TrainSize; 30 | 31 | public void Create(uint windowSize) 32 | { 33 | if (_windowSize != windowSize) 34 | { 35 | // System.GC.Collect(); 36 | _buffer = new byte[windowSize]; 37 | } 38 | _windowSize = windowSize; 39 | _pos = 0; 40 | _streamPos = 0; 41 | } 42 | 43 | public void Init(Stream stream, bool solid) 44 | { 45 | ReleaseStream(); 46 | _stream = stream; 47 | if (!solid) 48 | { 49 | _streamPos = 0; 50 | _pos = 0; 51 | TrainSize = 0; 52 | } 53 | } 54 | 55 | public bool Train(Stream stream) 56 | { 57 | long len = stream.Length; 58 | uint size = (len < _windowSize) ? (uint) len : _windowSize; 59 | TrainSize = size; 60 | stream.Position = len - size; 61 | _streamPos = _pos = 0; 62 | while (size > 0) 63 | { 64 | uint curSize = _windowSize - _pos; 65 | if (size < curSize) 66 | curSize = size; 67 | int numReadBytes = stream.Read(_buffer, (int) _pos, (int) curSize); 68 | if (numReadBytes == 0) 69 | return false; 70 | size -= (uint) numReadBytes; 71 | _pos += (uint) numReadBytes; 72 | _streamPos += (uint) numReadBytes; 73 | if (_pos == _windowSize) 74 | _streamPos = _pos = 0; 75 | } 76 | return true; 77 | } 78 | 79 | public void ReleaseStream() 80 | { 81 | Flush(); 82 | _stream = null; 83 | } 84 | 85 | public void Flush() 86 | { 87 | uint size = _pos - _streamPos; 88 | if (size == 0) 89 | return; 90 | _stream.Write(_buffer, (int) _streamPos, (int) size); 91 | if (_pos >= _windowSize) 92 | _pos = 0; 93 | _streamPos = _pos; 94 | } 95 | 96 | public void CopyBlock(uint distance, uint len) 97 | { 98 | uint pos = _pos - distance - 1; 99 | if (pos >= _windowSize) 100 | pos += _windowSize; 101 | for (; len > 0; len--) 102 | { 103 | if (pos >= _windowSize) 104 | pos = 0; 105 | _buffer[_pos++] = _buffer[pos++]; 106 | if (_pos >= _windowSize) 107 | Flush(); 108 | } 109 | } 110 | 111 | public void PutByte(byte b) 112 | { 113 | _buffer[_pos++] = b; 114 | if (_pos >= _windowSize) 115 | Flush(); 116 | } 117 | 118 | public byte GetByte(uint distance) 119 | { 120 | uint pos = _pos - distance - 1; 121 | if (pos >= _windowSize) 122 | pos += _windowSize; 123 | return _buffer[pos]; 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Compress/LZMA/LzmaBase.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | namespace SevenZip.Sdk.Compression.Lzma 19 | { 20 | internal abstract class Base 21 | { 22 | public const uint kAlignMask = (kAlignTableSize - 1); 23 | public const uint kAlignTableSize = 1 << kNumAlignBits; 24 | public const int kDicLogSizeMin = 0; 25 | public const uint kEndPosModelIndex = 14; 26 | public const uint kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1; 27 | // public const int kDicLogSizeMax = 30; 28 | // public const uint kDistTableSizeMax = kDicLogSizeMax * 2; 29 | 30 | public const uint kMatchMinLen = 2; 31 | 32 | public const int kNumAlignBits = 4; 33 | 34 | public const uint kNumFullDistances = 1 << ((int) kEndPosModelIndex/2); 35 | public const int kNumHighLenBits = 8; 36 | 37 | public const uint kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols + 38 | (1 << kNumHighLenBits); 39 | 40 | public const uint kNumLenToPosStates = 1 << kNumLenToPosStatesBits; 41 | public const int kNumLenToPosStatesBits = 2; // it's for speed optimization 42 | 43 | public const uint kNumLitContextBitsMax = 8; 44 | public const uint kNumLitPosStatesBitsEncodingMax = 4; 45 | 46 | public const int kNumLowLenBits = 3; 47 | public const uint kNumLowLenSymbols = 1 << kNumLowLenBits; 48 | public const int kNumMidLenBits = 3; 49 | public const uint kNumMidLenSymbols = 1 << kNumMidLenBits; 50 | public const uint kNumPosModels = kEndPosModelIndex - kStartPosModelIndex; 51 | public const int kNumPosSlotBits = 6; 52 | public const int kNumPosStatesBitsEncodingMax = 4; 53 | public const int kNumPosStatesBitsMax = 4; 54 | public const uint kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax); 55 | public const uint kNumPosStatesMax = (1 << kNumPosStatesBitsMax); 56 | public const uint kNumRepDistances = 4; 57 | public const uint kNumStates = 12; 58 | public const uint kStartPosModelIndex = 4; 59 | 60 | public static uint GetLenToPosState(uint len) 61 | { 62 | len -= kMatchMinLen; 63 | if (len < kNumLenToPosStates) 64 | return len; 65 | return (kNumLenToPosStates - 1); 66 | } 67 | 68 | #region Nested type: State 69 | 70 | public struct State 71 | { 72 | public uint Index; 73 | 74 | public void Init() 75 | { 76 | Index = 0; 77 | } 78 | 79 | public void UpdateChar() 80 | { 81 | if (Index < 4) Index = 0; 82 | else if (Index < 10) Index -= 3; 83 | else Index -= 6; 84 | } 85 | 86 | public void UpdateMatch() 87 | { 88 | Index = (uint) (Index < 7 ? 7 : 10); 89 | } 90 | 91 | public void UpdateRep() 92 | { 93 | Index = (uint) (Index < 7 ? 8 : 11); 94 | } 95 | 96 | public void UpdateShortRep() 97 | { 98 | Index = (uint) (Index < 7 ? 9 : 11); 99 | } 100 | 101 | public bool IsCharState() 102 | { 103 | return Index < 7; 104 | } 105 | } 106 | 107 | #endregion 108 | } 109 | } -------------------------------------------------------------------------------- /SevenZipSharpMobile/sdk/Compress/RangeCoder/RangeCoderBit.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of SevenZipSharpMobile. 3 | 4 | SevenZipSharpMobile is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | SevenZipSharpMobile is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with SevenZipSharpMobile. If not, see . 16 | */ 17 | 18 | using System; 19 | 20 | namespace SevenZip.Sdk.Compression.RangeCoder 21 | { 22 | internal struct BitEncoder 23 | { 24 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 25 | public const int kNumBitModelTotalBits = 11; 26 | public const int kNumBitPriceShiftBits = 6; 27 | private const int kNumMoveBits = 5; 28 | private const int kNumMoveReducingBits = 2; 29 | private static readonly UInt32[] ProbPrices = new UInt32[kBitModelTotal >> kNumMoveReducingBits]; 30 | 31 | private uint Prob; 32 | 33 | static BitEncoder() 34 | { 35 | const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits); 36 | for (int i = kNumBits - 1; i >= 0; i--) 37 | { 38 | UInt32 start = (UInt32) 1 << (kNumBits - i - 1); 39 | UInt32 end = (UInt32) 1 << (kNumBits - i); 40 | for (UInt32 j = start; j < end; j++) 41 | ProbPrices[j] = ((UInt32) i << kNumBitPriceShiftBits) + 42 | (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1)); 43 | } 44 | } 45 | 46 | public void Init() 47 | { 48 | Prob = kBitModelTotal >> 1; 49 | } 50 | 51 | /*public void UpdateModel(uint symbol) 52 | { 53 | if (symbol == 0) 54 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 55 | else 56 | Prob -= (Prob) >> kNumMoveBits; 57 | }*/ 58 | 59 | public void Encode(Encoder encoder, uint symbol) 60 | { 61 | // encoder.EncodeBit(Prob, kNumBitModelTotalBits, symbol); 62 | // UpdateModel(symbol); 63 | uint newBound = (encoder.Range >> kNumBitModelTotalBits)*Prob; 64 | if (symbol == 0) 65 | { 66 | encoder.Range = newBound; 67 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 68 | } 69 | else 70 | { 71 | encoder.Low += newBound; 72 | encoder.Range -= newBound; 73 | Prob -= (Prob) >> kNumMoveBits; 74 | } 75 | if (encoder.Range < Encoder.kTopValue) 76 | { 77 | encoder.Range <<= 8; 78 | encoder.ShiftLow(); 79 | } 80 | } 81 | 82 | public uint GetPrice(uint symbol) 83 | { 84 | return ProbPrices[(((Prob - symbol) ^ ((-(int) symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; 85 | } 86 | 87 | public uint GetPrice0() 88 | { 89 | return ProbPrices[Prob >> kNumMoveReducingBits]; 90 | } 91 | 92 | public uint GetPrice1() 93 | { 94 | return ProbPrices[(kBitModelTotal - Prob) >> kNumMoveReducingBits]; 95 | } 96 | } 97 | 98 | internal struct BitDecoder 99 | { 100 | public const uint kBitModelTotal = (1 << kNumBitModelTotalBits); 101 | public const int kNumBitModelTotalBits = 11; 102 | private const int kNumMoveBits = 5; 103 | 104 | private uint Prob; 105 | 106 | /*public void UpdateModel(int numMoveBits, uint symbol) 107 | { 108 | if (symbol == 0) 109 | Prob += (kBitModelTotal - Prob) >> numMoveBits; 110 | else 111 | Prob -= (Prob) >> numMoveBits; 112 | }*/ 113 | 114 | public void Init() 115 | { 116 | Prob = kBitModelTotal >> 1; 117 | } 118 | 119 | public uint Decode(Decoder rangeDecoder) 120 | { 121 | uint newBound = (rangeDecoder.Range >> kNumBitModelTotalBits)*Prob; 122 | if (rangeDecoder.Code < newBound) 123 | { 124 | rangeDecoder.Range = newBound; 125 | Prob += (kBitModelTotal - Prob) >> kNumMoveBits; 126 | if (rangeDecoder.Range < Decoder.kTopValue) 127 | { 128 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 129 | rangeDecoder.Range <<= 8; 130 | } 131 | return 0; 132 | } 133 | else 134 | { 135 | rangeDecoder.Range -= newBound; 136 | rangeDecoder.Code -= newBound; 137 | Prob -= (Prob) >> kNumMoveBits; 138 | if (rangeDecoder.Range < Decoder.kTopValue) 139 | { 140 | rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte) rangeDecoder.Stream.ReadByte(); 141 | rangeDecoder.Range <<= 8; 142 | } 143 | return 1; 144 | } 145 | } 146 | } 147 | } -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/FormMain.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SevenZipSharpMobileTest 2 | { 3 | partial class FormMain 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | private System.Windows.Forms.MainMenu mainMenu1; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.mainMenu1 = new System.Windows.Forms.MainMenu(); 33 | this.tb_Log = new System.Windows.Forms.TextBox(); 34 | this.menuItem1 = new System.Windows.Forms.MenuItem(); 35 | this.SuspendLayout(); 36 | // 37 | // mainMenu1 38 | // 39 | this.mainMenu1.MenuItems.Add(this.menuItem1); 40 | // 41 | // tb_Log 42 | // 43 | this.tb_Log.Dock = System.Windows.Forms.DockStyle.Fill; 44 | this.tb_Log.Location = new System.Drawing.Point(0, 0); 45 | this.tb_Log.Multiline = true; 46 | this.tb_Log.Name = "tb_Log"; 47 | this.tb_Log.Size = new System.Drawing.Size(240, 268); 48 | this.tb_Log.TabIndex = 0; 49 | // 50 | // menuItem1 51 | // 52 | this.menuItem1.Text = "Test"; 53 | this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click); 54 | // 55 | // FormMain 56 | // 57 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); 58 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 59 | this.AutoScroll = true; 60 | this.ClientSize = new System.Drawing.Size(240, 268); 61 | this.Controls.Add(this.tb_Log); 62 | this.Menu = this.mainMenu1; 63 | this.Name = "FormMain"; 64 | this.Text = "SevenZipSharp"; 65 | this.ResumeLayout(false); 66 | 67 | } 68 | 69 | #endregion 70 | 71 | private System.Windows.Forms.TextBox tb_Log; 72 | private System.Windows.Forms.MenuItem menuItem1; 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/FormMain.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows.Forms; 4 | 5 | namespace SevenZipSharpMobileTest 6 | { 7 | public partial class FormMain : Form 8 | { 9 | public FormMain() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void menuItem1_Click(object sender, System.EventArgs e) 15 | { 16 | var fileName = Path.GetDirectoryName( 17 | System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + 18 | "\\gpl.7z"; 19 | tb_Log.Text += "File name is \"" + fileName + "\"" + Environment.NewLine; 20 | using (var extr = new SevenZip.SevenZipExtractor(fileName)) 21 | { 22 | tb_Log.Text += "The archive was successfully identified. Ready to extract" + Environment.NewLine; 23 | extr.ExtractArchive(Path.GetDirectoryName( 24 | System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)); 25 | tb_Log.Text += "Extracted successfully!" + Environment.NewLine; 26 | } 27 | tb_Log.Text += "Performing an internal benchmark..." + Environment.NewLine; 28 | var features = SevenZip.SevenZipExtractor.CurrentLibraryFeatures; 29 | tb_Log.Text += "Finished. The score is " + ((uint)features).ToString("X6") + Environment.NewLine; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using System.Windows.Forms; 5 | 6 | namespace SevenZipSharpMobileTest 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [MTAThread] 14 | static void Main() 15 | { 16 | Application.Run(new FormMain()); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SevenZipSharpMobileTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SevenZipSharpMobileTest")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("faa27044-4cde-43d9-950f-9b87d815d4dd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | 34 | // Below attribute is to suppress FxCop warning "CA2232 : Microsoft.Usage : Add STAThreadAttribute to assembly" 35 | // as Device app does not support STA thread. 36 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2232:MarkWindowsFormsEntryPointsWithStaThread")] 37 | -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.4927 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SevenZipSharpMobileTest.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the Strongly Typed Resource Builder 19 | // class via a tool like ResGen or Visual Studio.NET. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | class Resources 23 | { 24 | 25 | private static System.Resources.ResourceManager _resMgr; 26 | 27 | private static System.Globalization.CultureInfo _resCulture; 28 | 29 | /*FamANDAssem*/ 30 | internal Resources() 31 | { 32 | } 33 | 34 | /// 35 | /// Returns the cached ResourceManager instance used by this class. 36 | /// 37 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 38 | public static System.Resources.ResourceManager ResourceManager 39 | { 40 | get 41 | { 42 | if ((_resMgr == null)) 43 | { 44 | System.Resources.ResourceManager temp = new System.Resources.ResourceManager("SevenZipSharpMobileTest.Properties.Resources", typeof(Resources).Assembly); 45 | _resMgr = temp; 46 | } 47 | return _resMgr; 48 | } 49 | } 50 | 51 | /// 52 | /// Overrides the current thread's CurrentUICulture property for all 53 | /// resource lookups using this strongly typed resource class. 54 | /// 55 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 56 | public static System.Globalization.CultureInfo Culture 57 | { 58 | get 59 | { 60 | return _resCulture; 61 | } 62 | set 63 | { 64 | _resCulture = value; 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/SevenZipSharpMobileTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Debug 4 | AnyCPU 5 | 9.0.30729 6 | 2.0 7 | {B044998A-1DDF-4955-B1F0-9D77AFAF4239} 8 | WinExe 9 | Properties 10 | SevenZipSharpMobileTest 11 | SevenZipSharpMobileTest 12 | {4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | PocketPC 14 | b2c48bd2-963d-4549-9169-1fa021dce484 15 | 5.2 16 | SevenZipSharpMobileTest 17 | v3.5 18 | Windows Mobile 6 Professional SDK 19 | 20 | 21 | 22 | 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE;$(PlatformFamilyName) 28 | true 29 | true 30 | prompt 31 | 512 32 | 4 33 | Off 34 | 35 | 36 | pdbonly 37 | true 38 | bin\Release\ 39 | TRACE;$(PlatformFamilyName) 40 | true 41 | true 42 | prompt 43 | 512 44 | 4 45 | Off 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Form 57 | 58 | 59 | FormMain.cs 60 | 61 | 62 | 63 | 64 | FormMain.cs 65 | 66 | 67 | ResXFileCodeGenerator 68 | Resources.Designer.cs 69 | Designer 70 | 71 | 72 | True 73 | Resources.resx 74 | 75 | 76 | 77 | 78 | {29DDDB7C-F1E9-439C-83CF-D2975FD7A70C} 79 | SevenZipSharpMobile 80 | 81 | 82 | 83 | 84 | 7z.dll 85 | PreserveNewest 86 | 87 | 88 | PreserveNewest 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /SevenZipSharpMobileTest/gpl.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipSharpMobileTest/gpl.7z -------------------------------------------------------------------------------- /SevenZipTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SevenZipTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("MIPT")] 12 | [assembly: AssemblyProduct("SevenZipTest")] 13 | [assembly: AssemblyCopyright("Copyright © MIPT 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cc5e7de8-0fe2-43c4-a217-1f215bbcd798")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SevenZipTest/SevenZipTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {B87AD11B-B701-496B-B48E-D1D963F2A336} 9 | Exe 10 | Properties 11 | SevenZipTest 12 | SevenZipTest 13 | v2.0 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 44 | SevenZip 45 | 46 | 47 | 48 | 55 | -------------------------------------------------------------------------------- /SevenZipTest/SevenZipTest2010.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {B87AD11B-B701-496B-B48E-D1D963F2A336} 9 | Exe 10 | Properties 11 | SevenZipTest 12 | SevenZipTest 13 | v4.0 14 | 512 15 | 16 | 17 | 18 | 19 | 3.5 20 | 21 | publish\ 22 | true 23 | Disk 24 | false 25 | Foreground 26 | 7 27 | Days 28 | false 29 | false 30 | true 31 | 0 32 | 1.0.0.%2a 33 | false 34 | false 35 | true 36 | 37 | 38 | true 39 | full 40 | false 41 | bin\Debug\ 42 | DEBUG;TRACE 43 | prompt 44 | 4 45 | 46 | 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 66 | SevenZip 67 | 68 | 69 | 70 | 71 | False 72 | .NET Framework 3.5 SP1 Client Profile 73 | false 74 | 75 | 76 | False 77 | .NET Framework 3.5 SP1 78 | true 79 | 80 | 81 | False 82 | Windows Installer 3.1 83 | true 84 | 85 | 86 | 87 | 94 | -------------------------------------------------------------------------------- /SevenZipTest/SevenZipTest2013.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {B87AD11B-B701-496B-B48E-D1D963F2A336} 9 | Exe 10 | Properties 11 | SevenZipTest 12 | SevenZipTest 13 | v4.0 14 | 512 15 | 16 | 17 | 18 | 19 | 3.5 20 | 21 | publish\ 22 | true 23 | Disk 24 | false 25 | Foreground 26 | 7 27 | Days 28 | false 29 | false 30 | true 31 | 0 32 | 1.0.0.%2a 33 | false 34 | false 35 | true 36 | 37 | 38 | true 39 | full 40 | false 41 | bin\Debug\ 42 | DEBUG;TRACE 43 | prompt 44 | 4 45 | false 46 | 47 | 48 | pdbonly 49 | true 50 | bin\Release\ 51 | TRACE 52 | prompt 53 | 4 54 | false 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 68 | SevenZip2013 69 | 70 | 71 | 72 | 73 | False 74 | .NET Framework 3.5 SP1 Client Profile 75 | false 76 | 77 | 78 | False 79 | .NET Framework 3.5 SP1 80 | true 81 | 82 | 83 | False 84 | Windows Installer 3.1 85 | true 86 | 87 | 88 | 89 | 90 | 91 | 92 | 99 | -------------------------------------------------------------------------------- /SevenZipTest/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SevenZipTestForms/Program.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of SevenZipSharp. 2 | 3 | SevenZipSharp is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | SevenZipSharp is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with SevenZipSharp. If not, see . 15 | */ 16 | 17 | using System; 18 | using System.Windows.Forms; 19 | 20 | namespace SevenZipTestForms 21 | { 22 | static class Program 23 | { 24 | /// 25 | /// The main entry point for the application. 26 | /// 27 | [STAThread] 28 | static void Main() 29 | { 30 | Application.EnableVisualStyles(); 31 | Application.SetCompatibleTextRenderingDefault(false); 32 | Application.Run(new FormMain()); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SevenZipTestForms/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SevenZipTestForms")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("MIPT")] 12 | [assembly: AssemblyProduct("SevenZipTestForms")] 13 | [assembly: AssemblyCopyright("Copyright © MIPT 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ac6e2d70-d9fa-49e4-9e8e-6adf9915e980")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SevenZipTestForms/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3074 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SevenZipTestForms.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SevenZipTestForms.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /SevenZipTestForms/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /SevenZipTestForms/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.3074 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SevenZipTestForms.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SevenZipTestForms/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SevenZipTestForms/SevenZipTestForms.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {F87D341F-98B8-46B5-9794-880EB0649781} 9 | WinExe 10 | Properties 11 | SevenZipTestForms 12 | SevenZipTestForms 13 | v2.0 14 | 512 15 | 16 | 17 | 18 | 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Form 44 | 45 | 46 | FormMain.cs 47 | 48 | 49 | 50 | 51 | FormMain.cs 52 | 53 | 54 | ResXFileCodeGenerator 55 | Resources.Designer.cs 56 | Designer 57 | 58 | 59 | True 60 | Resources.resx 61 | 62 | 63 | SettingsSingleFileGenerator 64 | Settings.Designer.cs 65 | 66 | 67 | True 68 | Settings.settings 69 | True 70 | 71 | 72 | 73 | 74 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 75 | SevenZip 76 | 77 | 78 | 79 | 86 | -------------------------------------------------------------------------------- /SevenZipTestWPF/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SevenZipTestWPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace SevenZipTestWPF 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SevenZipTestWPF/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("SevenZipTestWPF")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("SevenZipTestWPF")] 15 | [assembly: AssemblyCopyright("Copyright © 2010")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /SevenZipTestWPF/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.34011 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SevenZipTestWPF.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. 17 | /// 18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert 19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. 20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen 21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SevenZipTestWPF.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle 51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SevenZipTestWPF/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /SevenZipTestWPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.34011 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SevenZipTestWPF.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SevenZipTestWPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SevenZipTestWPF/References/FolderBrowser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipTestWPF/References/FolderBrowser.dll -------------------------------------------------------------------------------- /SevenZipTestWPF/References/Microsoft.WindowsAPICodePack.Shell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipTestWPF/References/Microsoft.WindowsAPICodePack.Shell.dll -------------------------------------------------------------------------------- /SevenZipTestWPF/References/Microsoft.WindowsAPICodePack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/UniqProject/SevenZipSharp/64d591f188df3dcbc89cfd06f94f410f5a08fd6c/SevenZipTestWPF/References/Microsoft.WindowsAPICodePack.dll -------------------------------------------------------------------------------- /SevenZipTestWPF/SevenZipTestWPF.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C} 9 | WinExe 10 | Properties 11 | SevenZipTestWPF 12 | SevenZipTestWPF 13 | v4.0 14 | Client 15 | 512 16 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 17 | 4 18 | 19 | 20 | x86 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | x86 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | 40 | References\FolderBrowser.dll 41 | 42 | 43 | References\Microsoft.WindowsAPICodePack.dll 44 | 45 | 46 | References\Microsoft.WindowsAPICodePack.Shell.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | MSBuild:Compile 57 | Designer 58 | 59 | 60 | MSBuild:Compile 61 | Designer 62 | 63 | 64 | App.xaml 65 | Code 66 | 67 | 68 | MainWindow.xaml 69 | Code 70 | 71 | 72 | 73 | 74 | Code 75 | 76 | 77 | True 78 | True 79 | Resources.resx 80 | 81 | 82 | True 83 | Settings.settings 84 | True 85 | 86 | 87 | ResXFileCodeGenerator 88 | Resources.Designer.cs 89 | 90 | 91 | SettingsSingleFileGenerator 92 | Settings.Designer.cs 93 | 94 | 95 | 96 | 97 | 98 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 99 | SevenZip2010 100 | 101 | 102 | 103 | 110 | -------------------------------------------------------------------------------- /SevenZipTestWPF/SevenZipTestWPF2013.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {B6581047-3FBE-45E4-B4F8-F517FA3A6B6C} 9 | WinExe 10 | Properties 11 | SevenZipTestWPF 12 | SevenZipTestWPF 13 | v4.0 14 | 15 | 16 | 512 17 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 18 | 4 19 | 20 | 21 | x86 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | x86 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | false 40 | 41 | 42 | 43 | References\FolderBrowser.dll 44 | 45 | 46 | References\Microsoft.WindowsAPICodePack.dll 47 | 48 | 49 | References\Microsoft.WindowsAPICodePack.Shell.dll 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | MSBuild:Compile 60 | Designer 61 | 62 | 63 | MSBuild:Compile 64 | Designer 65 | 66 | 67 | App.xaml 68 | Code 69 | 70 | 71 | MainWindow.xaml 72 | Code 73 | 74 | 75 | 76 | 77 | Code 78 | 79 | 80 | True 81 | True 82 | Resources.resx 83 | 84 | 85 | True 86 | Settings.settings 87 | True 88 | 89 | 90 | ResXFileCodeGenerator 91 | Resources.Designer.cs 92 | 93 | 94 | 95 | SettingsSingleFileGenerator 96 | Settings.Designer.cs 97 | 98 | 99 | 100 | 101 | 102 | {4960DD14-3431-47EC-B9D9-9D2730A98DC3} 103 | SevenZip2013 104 | 105 | 106 | 107 | 114 | -------------------------------------------------------------------------------- /SevenZipTestWPF/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | --------------------------------------------------------------------------------