8 /// The exception that is thrown when an error in input stream occurs during decoding.
10 class DataErrorException : ApplicationException
12 public DataErrorException(): base("Data Error") { }
16 /// The exception that is thrown when the value of an argument is outside the allowable range.
18 class InvalidParamException : ApplicationException
20 public InvalidParamException(): base("Invalid Parameter") { }
23 public interface ICodeProgress
26 /// Callback progress.
28 /// <param name="inSize">
29 /// input size. -1 if unknown.
31 /// <param name="outSize">
32 /// output size. -1 if unknown.
34 void SetProgress(Int64 inSize, Int64 outSize);
37 public interface ICoder
42 /// <param name="inStream">
45 /// <param name="outStream">
48 /// <param name="inSize">
49 /// input Size. -1 if unknown.
51 /// <param name="outSize">
52 /// output Size. -1 if unknown.
54 /// <param name="progress">
55 /// callback progress reference.
57 /// <exception cref="SevenZip.DataErrorException">
58 /// if input stream is not valid
60 void Code(System.IO.Stream inStream, System.IO.Stream outStream,
61 Int64 inSize, Int64 outSize, ICodeProgress progress);
65 public interface ICoder2
67 void Code(ISequentialInStream []inStreams,
68 const UInt64 []inSizes,
69 ISequentialOutStream []outStreams,
71 ICodeProgress progress);
76 /// Provides the fields that represent properties idenitifiers for compressing.
78 public enum CoderPropID
81 /// Specifies size of dictionary.
83 DictionarySize = 0x400,
85 /// Specifies size of memory for PPM*.
89 /// Specifies order for PPM methods.
93 /// Specifies number of postion state bits for LZMA (0 <= x <= 4).
97 /// Specifies number of literal context bits for LZMA (0 <= x <= 8).
101 /// Specifies number of literal position bits for LZMA (0 <= x <= 4).
105 /// Specifies number of fast bytes for LZ*.
107 NumFastBytes = 0x450,
109 /// Specifies match finder. LZMA: "BT2", "BT4" or "BT4B".
113 /// Specifies number of passes.
117 /// Specifies number of algorithm.
121 /// Specifies multithread mode.
125 /// Specifies mode with end marker.
131 public interface ISetCoderProperties
133 void SetCoderProperties(CoderPropID[] propIDs, object[] properties);
136 public interface IWriteCoderProperties
138 void WriteCoderProperties(System.IO.Stream outStream);
141 public interface ISetDecoderProperties
143 void SetDecoderProperties(byte[] properties);