summaryrefslogtreecommitdiffstats
path: root/other-licenses/7zstub/src/CS/7zip/ICoder.cs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /other-licenses/7zstub/src/CS/7zip/ICoder.cs
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'other-licenses/7zstub/src/CS/7zip/ICoder.cs')
-rw-r--r--other-licenses/7zstub/src/CS/7zip/ICoder.cs157
1 files changed, 157 insertions, 0 deletions
diff --git a/other-licenses/7zstub/src/CS/7zip/ICoder.cs b/other-licenses/7zstub/src/CS/7zip/ICoder.cs
new file mode 100644
index 0000000000..875cb2739e
--- /dev/null
+++ b/other-licenses/7zstub/src/CS/7zip/ICoder.cs
@@ -0,0 +1,157 @@
+// ICoder.h
+
+using System;
+
+namespace SevenZip
+{
+ /// <summary>
+ /// The exception that is thrown when an error in input stream occurs during decoding.
+ /// </summary>
+ class DataErrorException : ApplicationException
+ {
+ public DataErrorException(): base("Data Error") { }
+ }
+
+ /// <summary>
+ /// The exception that is thrown when the value of an argument is outside the allowable range.
+ /// </summary>
+ class InvalidParamException : ApplicationException
+ {
+ public InvalidParamException(): base("Invalid Parameter") { }
+ }
+
+ public interface ICodeProgress
+ {
+ /// <summary>
+ /// Callback progress.
+ /// </summary>
+ /// <param name="inSize">
+ /// input size. -1 if unknown.
+ /// </param>
+ /// <param name="outSize">
+ /// output size. -1 if unknown.
+ /// </param>
+ void SetProgress(Int64 inSize, Int64 outSize);
+ };
+
+ public interface ICoder
+ {
+ /// <summary>
+ /// Codes streams.
+ /// </summary>
+ /// <param name="inStream">
+ /// input Stream.
+ /// </param>
+ /// <param name="outStream">
+ /// output Stream.
+ /// </param>
+ /// <param name="inSize">
+ /// input Size. -1 if unknown.
+ /// </param>
+ /// <param name="outSize">
+ /// output Size. -1 if unknown.
+ /// </param>
+ /// <param name="progress">
+ /// callback progress reference.
+ /// </param>
+ /// <exception cref="SevenZip.DataErrorException">
+ /// if input stream is not valid
+ /// </exception>
+ void Code(System.IO.Stream inStream, System.IO.Stream outStream,
+ Int64 inSize, Int64 outSize, ICodeProgress progress);
+ };
+
+ /*
+ public interface ICoder2
+ {
+ void Code(ISequentialInStream []inStreams,
+ const UInt64 []inSizes,
+ ISequentialOutStream []outStreams,
+ UInt64 []outSizes,
+ ICodeProgress progress);
+ };
+ */
+
+ /// <summary>
+ /// Provides the fields that represent properties idenitifiers for compressing.
+ /// </summary>
+ public enum CoderPropID
+ {
+ /// <summary>
+ /// Specifies default property.
+ /// </summary>
+ DefaultProp = 0,
+ /// <summary>
+ /// Specifies size of dictionary.
+ /// </summary>
+ DictionarySize,
+ /// <summary>
+ /// Specifies size of memory for PPM*.
+ /// </summary>
+ UsedMemorySize,
+ /// <summary>
+ /// Specifies order for PPM methods.
+ /// </summary>
+ Order,
+ /// <summary>
+ /// Specifies Block Size.
+ /// </summary>
+ BlockSize,
+ /// <summary>
+ /// Specifies number of postion state bits for LZMA (0 <= x <= 4).
+ /// </summary>
+ PosStateBits,
+ /// <summary>
+ /// Specifies number of literal context bits for LZMA (0 <= x <= 8).
+ /// </summary>
+ LitContextBits,
+ /// <summary>
+ /// Specifies number of literal position bits for LZMA (0 <= x <= 4).
+ /// </summary>
+ LitPosBits,
+ /// <summary>
+ /// Specifies number of fast bytes for LZ*.
+ /// </summary>
+ NumFastBytes,
+ /// <summary>
+ /// Specifies match finder. LZMA: "BT2", "BT4" or "BT4B".
+ /// </summary>
+ MatchFinder,
+ /// <summary>
+ /// Specifies the number of match finder cyckes.
+ /// </summary>
+ MatchFinderCycles,
+ /// <summary>
+ /// Specifies number of passes.
+ /// </summary>
+ NumPasses,
+ /// <summary>
+ /// Specifies number of algorithm.
+ /// </summary>
+ Algorithm,
+ /// <summary>
+ /// Specifies the number of threads.
+ /// </summary>
+ NumThreads,
+ /// <summary>
+ /// Specifies mode with end marker.
+ /// </summary>
+ EndMarker
+ };
+
+
+ public interface ISetCoderProperties
+ {
+ void SetCoderProperties(CoderPropID[] propIDs, object[] properties);
+ };
+
+ public interface IWriteCoderProperties
+ {
+ void WriteCoderProperties(System.IO.Stream outStream);
+ }
+
+ public interface ISetDecoderProperties
+ {
+ void SetDecoderProperties(byte[] properties);
+ }
+}