/* libmspack -- a library for working with Microsoft compression formats. * (C) 2003-2019 Stuart Caie * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ namespace LibMSPackSharp { /// /// All compressors and decompressors use the same set of error codes. Most /// methods return an error code directly.For methods which do not /// return error codes directly, the error code can be obtained with the /// last_error() method. /// public enum Error { /// /// Used to indicate success. /// This error code is defined as zero, all other code are non-zero. /// MSPACK_ERR_OK = 0, /// /// A method was called with inappropriate arguments. /// MSPACK_ERR_ARGS = 1, /// /// Error opening file /// MSPACK_ERR_OPEN = 2, /// /// Error reading file /// MSPACK_ERR_READ = 3, /// /// Error writing file /// MSPACK_ERR_WRITE = 4, /// /// Seek error /// MSPACK_ERR_SEEK = 5, /// /// Out of memory /// MSPACK_ERR_NOMEMORY = 6, /// /// Bad "magic id" in file /// MSPACK_ERR_SIGNATURE = 7, /// /// Bad or corrupt file format /// MSPACK_ERR_DATAFORMAT = 8, /// /// Bad checksum or CRC /// MSPACK_ERR_CHECKSUM = 9, /// /// Error during compression /// MSPACK_ERR_CRUNCH = 10, /// /// Error during decompression /// MSPACK_ERR_DECRUNCH = 11, } /// /// The interface to request current version of /// public enum Interfaces { /// /// Pass to mspack_version() to get the overall library version /// MSPACK_VER_LIBRARY = 0, /// /// Pass to mspack_version() to get the mspack_system version /// MSPACK_VER_SYSTEM = 1, /// /// Pass to mspack_version() to get the mscab_decompressor version /// MSPACK_VER_MSCABD = 2, /// /// Pass to mspack_version() to get the mscab_compressor version /// MSPACK_VER_MSCABC = 3, /// /// Pass to mspack_version() to get the mschm_decompressor version /// MSPACK_VER_MSCHMD = 4, /// /// Pass to mspack_version() to get the mschm_compressor version /// MSPACK_VER_MSCHMC = 5, /// /// Pass to mspack_version() to get the mslit_decompressor version /// MSPACK_VER_MSLITD = 6, /// /// Pass to mspack_version() to get the mslit_compressor version /// MSPACK_VER_MSLITC = 7, /// /// Pass to mspack_version() to get the mshlp_decompressor version /// MSPACK_VER_MSHLPD = 8, /// /// Pass to mspack_version() to get the mshlp_compressor version /// MSPACK_VER_MSHLPC = 9, /// /// Pass to mspack_version() to get the msszdd_decompressor version /// MSPACK_VER_MSSZDDD = 10, /// /// Pass to mspack_version() to get the msszdd_compressor version /// MSPACK_VER_MSSZDDC = 11, /// /// Pass to mspack_version() to get the mskwaj_decompressor version /// MSPACK_VER_MSKWAJD = 12, /// /// Pass to mspack_version() to get the mskwaj_compressor version /// MSPACK_VER_MSKWAJC = 13, /// /// Pass to mspack_version() to get the msoab_decompressor version /// MSPACK_VER_MSOABD = 14, /// /// Pass to mspack_version() to get the msoab_compressor version /// MSPACK_VER_MSOABC = 15, } public enum OpenMode { /// /// mspack_system::open() mode: open existing file for reading. /// MSPACK_SYS_OPEN_READ = 0, /// /// mspack_system::open() mode: open new file for writing /// MSPACK_SYS_OPEN_WRITE = 1, /// /// mspack_system::open() mode: open existing file for writing /// MSPACK_SYS_OPEN_UPDATE = 2, /// /// mspack_system::open() mode: open existing file for writing /// MSPACK_SYS_OPEN_APPEND = 3, } public enum SeekMode { /// /// mspack_system::seek() mode: seek relative to start of file /// MSPACK_SYS_SEEK_START = 0, /// /// mspack_system::seek() mode: seek relative to current offset /// MSPACK_SYS_SEEK_CUR = 1, /// /// mspack_system::seek() mode: seek relative to end of file /// MSPACK_SYS_SEEK_END = 2, } }