summaryrefslogtreecommitdiffstats
path: root/tinySIGCOMP
diff options
context:
space:
mode:
Diffstat (limited to 'tinySIGCOMP')
-rw-r--r--tinySIGCOMP/Doxyfile1689
-rw-r--r--tinySIGCOMP/asm/deflate.asm131
-rw-r--r--tinySIGCOMP/asm/deflate.asm.back144
-rw-r--r--tinySIGCOMP/asm/dummy.asm27
-rw-r--r--tinySIGCOMP/droid-makefile59
-rw-r--r--tinySIGCOMP/footer.html7
-rw-r--r--tinySIGCOMP/header.html38
-rw-r--r--tinySIGCOMP/images/SigComp_Architecture.pngbin0 -> 38971 bytes
-rw-r--r--tinySIGCOMP/installdox.sh1
-rw-r--r--tinySIGCOMP/src/adler32.c152
-rw-r--r--tinySIGCOMP/src/compress.c82
-rw-r--r--tinySIGCOMP/src/deflate.c1740
-rw-r--r--tinySIGCOMP/src/deflate.h335
-rw-r--r--tinySIGCOMP/src/tcomp.c183
-rw-r--r--tinySIGCOMP/src/tcomp.h39
-rw-r--r--tinySIGCOMP/src/tcomp_buffer.c665
-rw-r--r--tinySIGCOMP/src/tcomp_buffer.h90
-rw-r--r--tinySIGCOMP/src/tcomp_compartment.c531
-rw-r--r--tinySIGCOMP/src/tcomp_compartment.h105
-rw-r--r--tinySIGCOMP/src/tcomp_compressor.h51
-rw-r--r--tinySIGCOMP/src/tcomp_compressor_deflate.c218
-rw-r--r--tinySIGCOMP/src/tcomp_compressor_deflate.h42
-rw-r--r--tinySIGCOMP/src/tcomp_compressor_dummy.c104
-rw-r--r--tinySIGCOMP/src/tcomp_compressor_dummy.h43
-rw-r--r--tinySIGCOMP/src/tcomp_compressordata.c115
-rw-r--r--tinySIGCOMP/src/tcomp_compressordata.h75
-rw-r--r--tinySIGCOMP/src/tcomp_compressordisp.c240
-rw-r--r--tinySIGCOMP/src/tcomp_compressordisp.h74
-rw-r--r--tinySIGCOMP/src/tcomp_decompressordisp.c412
-rw-r--r--tinySIGCOMP/src/tcomp_decompressordisp.h81
-rw-r--r--tinySIGCOMP/src/tcomp_deflatedata.c108
-rw-r--r--tinySIGCOMP/src/tcomp_deflatedata.ghost.c268
-rw-r--r--tinySIGCOMP/src/tcomp_deflatedata.h172
-rw-r--r--tinySIGCOMP/src/tcomp_deflatedata.zlib.c216
-rw-r--r--tinySIGCOMP/src/tcomp_dicts.c100
-rw-r--r--tinySIGCOMP/src/tcomp_dicts.h44
-rw-r--r--tinySIGCOMP/src/tcomp_headers_index.h83
-rw-r--r--tinySIGCOMP/src/tcomp_instructions.h74
-rw-r--r--tinySIGCOMP/src/tcomp_manager.c364
-rw-r--r--tinySIGCOMP/src/tcomp_manager.h85
-rw-r--r--tinySIGCOMP/src/tcomp_message.c360
-rw-r--r--tinySIGCOMP/src/tcomp_message.h74
-rw-r--r--tinySIGCOMP/src/tcomp_nack_codes.h63
-rw-r--r--tinySIGCOMP/src/tcomp_nackinfo.c86
-rw-r--r--tinySIGCOMP/src/tcomp_nackinfo.h84
-rw-r--r--tinySIGCOMP/src/tcomp_operands.h39
-rw-r--r--tinySIGCOMP/src/tcomp_params.c297
-rw-r--r--tinySIGCOMP/src/tcomp_params.h83
-rw-r--r--tinySIGCOMP/src/tcomp_reqfeed.c97
-rw-r--r--tinySIGCOMP/src/tcomp_reqfeed.h75
-rw-r--r--tinySIGCOMP/src/tcomp_result.c272
-rw-r--r--tinySIGCOMP/src/tcomp_result.h112
-rw-r--r--tinySIGCOMP/src/tcomp_rfc3485_dictionary_sip.h272
-rw-r--r--tinySIGCOMP/src/tcomp_rfc5049_sip.h54
-rw-r--r--tinySIGCOMP/src/tcomp_rfc5112_dictionary_presence.h209
-rw-r--r--tinySIGCOMP/src/tcomp_state.c191
-rw-r--r--tinySIGCOMP/src/tcomp_state.h78
-rw-r--r--tinySIGCOMP/src/tcomp_statehandler.c415
-rw-r--r--tinySIGCOMP/src/tcomp_statehandler.h82
-rw-r--r--tinySIGCOMP/src/tcomp_types.h38
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.bytecopy.c132
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.c550
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.h163
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.instructions.c1917
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.nack.c112
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.operands.c261
-rw-r--r--tinySIGCOMP/src/tcomp_udvm.statemanagment.c132
-rw-r--r--tinySIGCOMP/src/tinysigcomp_config.h90
-rw-r--r--tinySIGCOMP/src/trees.c1222
-rw-r--r--tinySIGCOMP/src/trees.h131
-rw-r--r--tinySIGCOMP/src/zconf.h337
-rw-r--r--tinySIGCOMP/src/zlib.h1360
-rw-r--r--tinySIGCOMP/src/zutil.c322
-rw-r--r--tinySIGCOMP/src/zutil.h272
-rw-r--r--tinySIGCOMP/test/rfc4465_torture_tests.h617
-rw-r--r--tinySIGCOMP/test/stdafx.c26
-rw-r--r--tinySIGCOMP/test/stdafx.h39
-rw-r--r--tinySIGCOMP/test/targetver.h18
-rw-r--r--tinySIGCOMP/test/test.c1160
-rw-r--r--tinySIGCOMP/test/test.vcproj383
-rw-r--r--tinySIGCOMP/tinySIGCOMP.sln44
-rw-r--r--tinySIGCOMP/tinySIGCOMP.tag8730
-rw-r--r--tinySIGCOMP/tinySIGCOMP.vcproj664
83 files changed, 30650 insertions, 0 deletions
diff --git a/tinySIGCOMP/Doxyfile b/tinySIGCOMP/Doxyfile
new file mode 100644
index 0000000..b84a96d
--- /dev/null
+++ b/tinySIGCOMP/Doxyfile
@@ -0,0 +1,1689 @@
+# Doxyfile 1.7.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = tinySIGCOMP
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = 1.0
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = /Users/dimitri/doxygen/mail/1.5.7/doxywizard/
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful if your file system
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or macro consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and macros in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 62
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = src
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.vhd *.vhdl
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.vhd \
+ *.vhdl \
+ *.asm
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH = images
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER = header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [0,1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+# Note that a value of 0 will completely suppress the enum values from
+# appearing in the overview section.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the
+# mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES = ../tinySAK/tinySAK.tag=http://doubango.org/API/tinySAK
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE = tinySIGCOMP.tag
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = NO
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif.
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/tinySIGCOMP/asm/deflate.asm b/tinySIGCOMP/asm/deflate.asm
new file mode 100644
index 0000000..041b5ea
--- /dev/null
+++ b/tinySIGCOMP/asm/deflate.asm
@@ -0,0 +1,131 @@
+at (32)
+readonly (0)
+
+:index pad (2)
+:extra_length_bits pad (2)
+:len_value pad (2)
+:extra_dist_bits pad (2)
+:dist_value pad (2)
+
+
+at (42)
+
+:req_feed_loc pad (1)
+:req_feed_len pad (1)
+:req_feed_field pad (12)
+:hash_start pad (8)
+
+at (64)
+
+:byte_copy_left pad (2)
+:byte_copy_right pad (2)
+:input_bit_order pad (2)
+:decompressed_ptr pad (2)
+:length_table pad (116)
+:distance_table pad (120)
+
+:hash_len_loc pad (2)
+:state_len_loc pad (2)
+:ret_params_loc pad (1)
+:sigcomp_version pad (1)
+
+align (64)
+
+
+readonly (1)
+:initialize_memory
+
+set (udvm_memory_size, 8192)
+set (length_table_start, (((length_table - 4) / 4) + 16384))
+set (length_table_mid, (length_table_start + 24))
+set (dist_table_start, (distance_table / 4))
+
+MULTILOAD (64, 122, circular_buffer, udvm_memory_size, 5,
+circular_buffer,
+
+0, 3, 0, 4, 0, 5,
+0, 6, 0, 7, 0, 8,
+0, 9, 0, 10, 1, 11,
+1, 13, 1, 15, 1, 17,
+2, 19, 2, 23, 2, 27,
+2, 31, 3, 35, 3, 43,
+3, 51, 3, 59, 4, 67,
+4, 83, 4, 99, 4, 115,
+5, 131, 5, 163, 5, 195,
+5, 227, 0, 258,
+
+0, 1, 0, 2, 0, 3,
+0, 4, 1, 5, 1, 7,
+2, 9, 2, 13, 3, 17,
+3, 25, 4, 33, 4, 49,
+5, 65, 5, 97, 6, 129,
+6, 193, 7, 257, 7, 385,
+8, 513, 8, 769, 9, 1025,
+9, 1537, 10, 2049, 10, 3073,
+11, 4097, 11, 6145, 12, 8193,
+12, 12289, 13, 16385, 13, 24577)
+
+; -- hash_len, state_len, params, version, dicts
+INPUT-BYTES (6, hash_len_loc, !)
+LOAD (66, $state_len_loc)
+ADD(66, 64)
+
+
+:decompress_sigcomp_msg
+
+:start_decomp
+
+INPUT-BITS (3, extra_length_bits, !)
+
+:next_char
+
+INPUT-HUFFMAN (index, end_of_msg, 4,
+ 7, 0, 23, length_table_start,
+ 1, 48, 191, 0,
+ 0, 192, 199, length_table_mid,
+ 1, 400, 511, 144)
+COMPARE ($index, length_table_start, literal, end_of_msg,
+length_distance)
+
+:literal
+
+set (index_lsb, (index + 1))
+
+OUTPUT (index_lsb, 1)
+COPY-LITERAL (index_lsb, 1, $decompressed_ptr)
+JUMP (next_char)
+
+:length_distance
+
+; this is the length part
+
+MULTIPLY ($index, 4)
+COPY ($index, 4, extra_length_bits)
+INPUT-BITS ($extra_length_bits, extra_length_bits, !)
+ADD ($len_value, $extra_length_bits)
+
+; this is the distance part
+
+INPUT-HUFFMAN (index, !, 1, 5, 0, 31, dist_table_start)
+MULTIPLY ($index, 4)
+COPY ($index, 4, extra_dist_bits)
+
+
+INPUT-BITS ($extra_dist_bits, extra_dist_bits, !)
+ADD ($dist_value, $extra_dist_bits)
+LOAD (index, $decompressed_ptr)
+COPY-OFFSET ($dist_value, $len_value, $decompressed_ptr)
+OUTPUT ($index, $len_value)
+JUMP (next_char)
+
+:end_of_msg
+
+
+LOAD (req_feed_loc, 1158)
+MULTILOAD (hash_start, 4, $state_len_loc, 64, decompress_sigcomp_msg, 6)
+SHA-1 (hash_start, $hash_len_loc, req_feed_field)
+
+END-MESSAGE (req_feed_loc, ret_params_loc, $state_len_loc, 64, decompress_sigcomp_msg, 6, 0)
+
+readonly (0)
+:circular_buffer \ No newline at end of file
diff --git a/tinySIGCOMP/asm/deflate.asm.back b/tinySIGCOMP/asm/deflate.asm.back
new file mode 100644
index 0000000..1bcde78
--- /dev/null
+++ b/tinySIGCOMP/asm/deflate.asm.back
@@ -0,0 +1,144 @@
+at (32)
+readonly (0)
+
+:index pad (2)
+:extra_length_bits pad (2)
+:len_value pad (2)
+:extra_dist_bits pad (2)
+:dist_value pad (2)
+
+
+at (42)
+
+:req_feed_loc pad (1)
+:req_feed_len pad (1)
+:req_feed_field pad (12)
+:hash_start pad (8)
+
+at (64)
+
+:byte_copy_left pad (2)
+:byte_copy_right pad (2)
+:input_bit_order pad (2)
+:decompressed_ptr pad (2)
+:length_table pad (116)
+:distance_table pad (120)
+
+:hash_len_loc pad (2)
+:state_len_loc pad (2)
+:ret_params_loc pad (1)
+:sigcomp_version pad (1)
+:dicts pad (2)
+
+align (64)
+
+
+readonly (1)
+:initialize_memory
+
+set (udvm_memory_size, 8192)
+set (length_table_start, (((length_table - 4) / 4) + 16384))
+set (length_table_mid, (length_table_start + 24))
+set (dist_table_start, (distance_table / 4))
+
+MULTILOAD (64, 122, circular_buffer, udvm_memory_size, 5,
+circular_buffer,
+
+0, 3, 0, 4, 0, 5,
+0, 6, 0, 7, 0, 8,
+0, 9, 0, 10, 1, 11,
+1, 13, 1, 15, 1, 17,
+2, 19, 2, 23, 2, 27,
+2, 31, 3, 35, 3, 43,
+3, 51, 3, 59, 4, 67,
+4, 83, 4, 99, 4, 115,
+5, 131, 5, 163, 5, 195,
+5, 227, 0, 258,
+
+0, 1, 0, 2, 0, 3,
+0, 4, 1, 5, 1, 7,
+2, 9, 2, 13, 3, 17,
+3, 25, 4, 33, 4, 49,
+5, 65, 5, 97, 6, 129,
+6, 193, 7, 257, 7, 385,
+8, 513, 8, 769, 9, 1025,
+9, 1537, 10, 2049, 10, 3073,
+11, 4097, 11, 6145, 12, 8193,
+12, 12289, 13, 16385, 13, 24577)
+
+; -- hash_len, state_len, params, version, dicts
+INPUT-BYTES (8, hash_len_loc, !)
+LOAD (66, $state_len_loc)
+ADD(66, 64)
+
+
+:decompress_sigcomp_msg
+
+; -- DICTIONARIES
+SWITCH (4, $dicts, sip, pres, sip_pres, start_decomp)
+
+:sip
+MULTILOAD (dicts, 4, 1787, 58631, 57317, 58880)
+JUMP (start_decomp)
+:pres
+MULTILOAD (dicts, 4, 1753, 16937, 32011, 45824)
+JUMP (start_decomp)
+:sip_pres
+MULTILOAD (dicts, 7, 1787, 58631, 57317, 58886, 55618, 10621, 2995)
+
+:start_decomp
+
+INPUT-BITS (3, extra_length_bits, !)
+
+:next_char
+
+INPUT-HUFFMAN (index, end_of_msg, 4,
+ 7, 0, 23, length_table_start,
+ 1, 48, 191, 0,
+ 0, 192, 199, length_table_mid,
+ 1, 400, 511, 144)
+COMPARE ($index, length_table_start, literal, end_of_msg,
+length_distance)
+
+:literal
+
+set (index_lsb, (index + 1))
+
+OUTPUT (index_lsb, 1)
+COPY-LITERAL (index_lsb, 1, $decompressed_ptr)
+JUMP (next_char)
+
+:length_distance
+
+; this is the length part
+
+MULTIPLY ($index, 4)
+COPY ($index, 4, extra_length_bits)
+INPUT-BITS ($extra_length_bits, extra_length_bits, !)
+ADD ($len_value, $extra_length_bits)
+
+; this is the distance part
+
+INPUT-HUFFMAN (index, !, 1, 5, 0, 31, dist_table_start)
+MULTIPLY ($index, 4)
+COPY ($index, 4, extra_dist_bits)
+
+
+INPUT-BITS ($extra_dist_bits, extra_dist_bits, !)
+ADD ($dist_value, $extra_dist_bits)
+LOAD (index, $decompressed_ptr)
+COPY-OFFSET ($dist_value, $len_value, $decompressed_ptr)
+OUTPUT ($index, $len_value)
+JUMP (next_char)
+
+:end_of_msg
+
+
+LOAD (req_feed_loc, 1158)
+MULTILOAD (hash_start, 4, $state_len_loc, 64, decompress_sigcomp_msg, 6)
+SHA-1 (hash_start, $hash_len_loc, req_feed_field)
+
+END-MESSAGE (req_feed_loc, ret_params_loc, $state_len_loc, 64, decompress_sigcomp_msg, 6, 0)
+
+readonly (0)
+:circular_buffer \ No newline at end of file
diff --git a/tinySIGCOMP/asm/dummy.asm b/tinySIGCOMP/asm/dummy.asm
new file mode 100644
index 0000000..6654fcf
--- /dev/null
+++ b/tinySIGCOMP/asm/dummy.asm
@@ -0,0 +1,27 @@
+ ; RFC 4896
+ at (0)
+ :udvm_memory_size pad (2)
+ :cycles_per_bit pad (2)
+ :sigcomp_version pad (2)
+ :partial_state_id_length pad (2)
+ :state_length pad (2)
+ :reserved pad (2)
+ at (64)
+ :byte_copy_left pad (2)
+ :byte_copy_right pad (2)
+ :input_bit_order pad (2)
+ :stack_location pad (2)
+
+ ; Simple loop
+ ; Read a byte
+ ; Output a byte
+ ; Until there are no more bytes!
+
+ at (128)
+ :start
+ INPUT-BYTES (1, byte_copy_left, end)
+ OUTPUT (byte_copy_left, 1)
+ JUMP (start)
+
+ :end
+ END-MESSAGE (0,0,0,0,0,0,0)
diff --git a/tinySIGCOMP/droid-makefile b/tinySIGCOMP/droid-makefile
new file mode 100644
index 0000000..1b57298
--- /dev/null
+++ b/tinySIGCOMP/droid-makefile
@@ -0,0 +1,59 @@
+APP := lib$(PROJECT)_$(MARCH).$(EXT)
+
+CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I./include
+LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH) -lm
+
+all: $(APP)
+
+OBJS = \
+ src/adler32.o\
+ src/compress.o\
+ src/deflate.o\
+ src/tcomp.o\
+ src/tcomp_buffer.o\
+ src/tcomp_compartment.o\
+ src/tcomp_compressordata.o\
+ src/tcomp_compressordisp.o\
+ src/tcomp_compressor_deflate.o\
+ src/tcomp_compressor_dummy.o\
+ src/tcomp_decompressordisp.o\
+ src/tcomp_deflatedata.o\
+ src/tcomp_deflatedata.ghost.o\
+ src/tcomp_deflatedata.zlib.o\
+ src/tcomp_dicts.o\
+ src/tcomp_manager.o\
+ src/tcomp_message.o\
+ src/tcomp_nackinfo.o\
+ src/tcomp_params.o\
+ src/tcomp_reqfeed.o\
+ src/tcomp_result.o\
+ src/tcomp_state.o\
+ src/tcomp_statehandler.o\
+ src/tcomp_udvm.bytecopy.o\
+ src/tcomp_udvm.o\
+ src/tcomp_udvm.instructions.o\
+ src/tcomp_udvm.nack.o\
+ src/tcomp_udvm.operands.o\
+ src/tcomp_udvm.statemanagment.o\
+ src/trees.o\
+ src/zutil.o\
+
+
+
+$(APP): $(OBJS)
+ifeq ($(EXT), a)
+ $(AR) rcs $@ $^
+else
+ $(CC) $(LDFLAGS) -o $@ $^
+endif
+
+%.o: %.c
+ $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
+
+install: $(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb remount
+ $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
+
+clean:
+ @rm -f $(OBJS) $(APP) \ No newline at end of file
diff --git a/tinySIGCOMP/footer.html b/tinySIGCOMP/footer.html
new file mode 100644
index 0000000..252eb8f
--- /dev/null
+++ b/tinySIGCOMP/footer.html
@@ -0,0 +1,7 @@
+<html>
+<head></head>
+<body>
+<hr>
+<b>doubango project - tinySigComp 1.0</b> - Copyright (C) 2009-2010 Mamadou DIOP. All rights reserved. Licensed under the terms of the GNU General Public License v3.
+</body>
+</html> \ No newline at end of file
diff --git a/tinySIGCOMP/header.html b/tinySIGCOMP/header.html
new file mode 100644
index 0000000..56643b9
--- /dev/null
+++ b/tinySIGCOMP/header.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>doubango - tinySigComp</title>
+ <link rel="stylesheet" href="http://www.doubango.org/css.css" type="text/css" />
+ <link href="tabs.css" rel="stylesheet" type="text/css"/>
+ <link href="doxygen.css" rel="stylesheet" type="text/css"/>
+ <meta name="Keywords" content="doubango, 3GPP LTE/IMS framework, open source, SIP, RFC 3261, 3GPP TS 24.229, VoIP, MMTel, IPTV, 4G, LTE, XCAP, MSRP, IPSec, SigComp, One Voice " />
+ <meta name="Description" content="cross-platform and open source 3GPP NGN/IMS framework for embedded devices such as Android, Symbian, iPhone, Windows Mobile or uLinux." />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+
+<style type="text/css">
+/*<![CDATA[*/
+ p.c1 {text-align: center;}
+/*]]>*/
+</style>
+</head>
+
+<body>
+ <div id="left">
+ <div id="border">
+ <div id="logo">
+ <p class="companyname">
+ tinySigComp</p>
+ </div>
+ <div id="menu">
+ <a href="/index.html" title="Homepage">Home</a> <a href="/gettingstarted.html" title="Getting Started">
+ Getting Started</a> <a href="http://code.google.com/p/doubango/source/checkout" title="Source Code"
+ target="_blank">Source Code</a> <a href="/apiref.html" title="API Reference">API Reference</a> <a href="contact.html" title="Contact">
+ Contact</a>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+
diff --git a/tinySIGCOMP/images/SigComp_Architecture.png b/tinySIGCOMP/images/SigComp_Architecture.png
new file mode 100644
index 0000000..0bb4a45
--- /dev/null
+++ b/tinySIGCOMP/images/SigComp_Architecture.png
Binary files differ
diff --git a/tinySIGCOMP/installdox.sh b/tinySIGCOMP/installdox.sh
new file mode 100644
index 0000000..2517e03
--- /dev/null
+++ b/tinySIGCOMP/installdox.sh
@@ -0,0 +1 @@
+docs/html/installdox -l tinySAK.tag@http://doubango.org/API/tinySAK docs/html/*.html \ No newline at end of file
diff --git a/tinySIGCOMP/src/adler32.c b/tinySIGCOMP/src/adler32.c
new file mode 100644
index 0000000..f7844d1
--- /dev/null
+++ b/tinySIGCOMP/src/adler32.c
@@ -0,0 +1,152 @@
+#if !HAS_ZLIB
+/* adler32.c -- compute the Adler-32 checksum of a data stream
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+#define BASE 65521UL /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+/* use NO_DIVIDE if your processor does not do division in hardware */
+#ifdef NO_DIVIDE
+# define MOD(a) \
+ do { \
+ if (a >= (BASE << 16)) a -= (BASE << 16); \
+ if (a >= (BASE << 15)) a -= (BASE << 15); \
+ if (a >= (BASE << 14)) a -= (BASE << 14); \
+ if (a >= (BASE << 13)) a -= (BASE << 13); \
+ if (a >= (BASE << 12)) a -= (BASE << 12); \
+ if (a >= (BASE << 11)) a -= (BASE << 11); \
+ if (a >= (BASE << 10)) a -= (BASE << 10); \
+ if (a >= (BASE << 9)) a -= (BASE << 9); \
+ if (a >= (BASE << 8)) a -= (BASE << 8); \
+ if (a >= (BASE << 7)) a -= (BASE << 7); \
+ if (a >= (BASE << 6)) a -= (BASE << 6); \
+ if (a >= (BASE << 5)) a -= (BASE << 5); \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+# define MOD4(a) \
+ do { \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+#else
+# define MOD(a) a %= BASE
+# define MOD4(a) a %= BASE
+#endif
+
+/* ========================================================================= */
+uLong ZEXPORT adler32(adler, buf, len)
+ uLong adler;
+ const Bytef *buf;
+ uInt len;
+{
+ unsigned long sum2;
+ unsigned n;
+
+ /* split Adler-32 into component sums */
+ sum2 = (adler >> 16) & 0xffff;
+ adler &= 0xffff;
+
+ /* in case user likes doing a byte at a time, keep it fast */
+ if (len == 1) {
+ adler += buf[0];
+ if (adler >= BASE)
+ adler -= BASE;
+ sum2 += adler;
+ if (sum2 >= BASE)
+ sum2 -= BASE;
+ return adler | (sum2 << 16);
+ }
+
+ /* initial Adler-32 value (deferred check for len == 1 speed) */
+ if (buf == Z_NULL)
+ return 1L;
+
+ /* in case short lengths are provided, keep it somewhat fast */
+ if (len < 16) {
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ if (adler >= BASE)
+ adler -= BASE;
+ MOD4(sum2); /* only added so many BASE's */
+ return adler | (sum2 << 16);
+ }
+
+ /* do length NMAX blocks -- requires just one modulo operation */
+ while (len >= NMAX) {
+ len -= NMAX;
+ n = NMAX / 16; /* NMAX is divisible by 16 */
+ do {
+ DO16(buf); /* 16 sums unrolled */
+ buf += 16;
+ } while (--n);
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* do remaining bytes (less than NMAX, still just one modulo) */
+ if (len) { /* avoid modulos if none remaining */
+ while (len >= 16) {
+ len -= 16;
+ DO16(buf);
+ buf += 16;
+ }
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* return recombined sums */
+ return adler | (sum2 << 16);
+}
+
+/* ========================================================================= */
+uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off_t len2;
+{
+ unsigned long sum1;
+ unsigned long sum2;
+ unsigned rem;
+
+ /* the derivation of this formula is left as an exercise for the reader */
+ rem = (unsigned)(len2 % BASE);
+ sum1 = adler1 & 0xffff;
+ sum2 = rem * sum1;
+ MOD(sum2);
+ sum1 += (adler2 & 0xffff) + BASE - 1;
+ sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
+ if (sum1 > BASE) sum1 -= BASE;
+ if (sum1 > BASE) sum1 -= BASE;
+ if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
+ if (sum2 > BASE) sum2 -= BASE;
+ return sum1 | (sum2 << 16);
+}
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/compress.c b/tinySIGCOMP/src/compress.c
new file mode 100644
index 0000000..ca01fbf
--- /dev/null
+++ b/tinySIGCOMP/src/compress.c
@@ -0,0 +1,82 @@
+#if !HAS_ZLIB
+/* compress.c -- compress a memory buffer
+ * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+/* ===========================================================================
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least 0.1% larger than sourceLen plus
+ 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+ int level;
+{
+ z_stream stream;
+ int err;
+
+ stream.next_in = (Bytef*)source;
+ stream.avail_in = (uInt)sourceLen;
+#ifdef MAXSEG_64K
+ /* Check for source > 64K on 16-bit machine: */
+ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
+#endif
+ stream.next_out = dest;
+ stream.avail_out = (uInt)*destLen;
+ if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
+
+ stream.zalloc = (alloc_func)0;
+ stream.zfree = (free_func)0;
+ stream.opaque = (voidpf)0;
+
+ err = deflateInit(&stream, level);
+ if (err != Z_OK) return err;
+
+ err = deflate(&stream, Z_FINISH);
+ if (err != Z_STREAM_END) {
+ deflateEnd(&stream);
+ return err == Z_OK ? Z_BUF_ERROR : err;
+ }
+ *destLen = stream.total_out;
+
+ err = deflateEnd(&stream);
+ return err;
+}
+
+/* ===========================================================================
+ */
+int ZEXPORT compress (dest, destLen, source, sourceLen)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+ uLong sourceLen;
+{
+ return compress2(dest, destLen, source, sourceLen, Z_BEST_SPEED);
+}
+
+/* ===========================================================================
+ If the default memLevel or windowBits for deflateInit() is changed, then
+ this function needs to be updated.
+ */
+uLong ZEXPORT compressBound (sourceLen)
+ uLong sourceLen;
+{
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
+}
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/deflate.c b/tinySIGCOMP/src/deflate.c
new file mode 100644
index 0000000..a3c208e
--- /dev/null
+++ b/tinySIGCOMP/src/deflate.c
@@ -0,0 +1,1740 @@
+#if !HAS_ZLIB
+/* deflate.c -- compress data using the deflation algorithm
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * ALGORITHM
+ *
+ * The "deflation" process depends on being able to identify portions
+ * of the input text which are identical to earlier input (within a
+ * sliding window trailing behind the input currently being processed).
+ *
+ * The most straightforward technique turns out to be the fastest for
+ * most input files: try all possible matches and select the longest.
+ * The key feature of this algorithm is that insertions into the string
+ * dictionary are very simple and thus fast, and deletions are avoided
+ * completely. Insertions are performed at each input character, whereas
+ * string matches are performed only when the previous match ends. So it
+ * is preferable to spend more time in matches to allow very fast string
+ * insertions and avoid deletions. The matching algorithm for small
+ * strings is inspired from that of Rabin & Karp. A brute force approach
+ * is used to find longer strings when a small match has been found.
+ * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
+ * (by Leonid Broukhis).
+ * A previous version of this file used a more sophisticated algorithm
+ * (by Fiala and Greene) which is guaranteed to run in linear amortized
+ * time, but has a larger average cost, uses more memory and is patented.
+ * However the F&G algorithm may be faster for some highly redundant
+ * files if the parameter max_chain_length (described below) is too large.
+ *
+ * ACKNOWLEDGEMENTS
+ *
+ * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
+ * I found it in 'freeze' written by Leonid Broukhis.
+ * Thanks to many people for bug reports and testing.
+ *
+ * REFERENCES
+ *
+ * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
+ * Available in http://www.ietf.org/rfc/rfc1951.txt
+ *
+ * A description of the Rabin and Karp algorithm is given in the book
+ * "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
+ *
+ * Fiala,E.R., and Greene,D.H.
+ * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
+ *
+ */
+
+/* @(#) $Id$ */
+
+#include "deflate.h"
+
+const char deflate_copyright[] =
+ " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/* ===========================================================================
+ * Function prototypes.
+ */
+typedef enum {
+ need_more, /* block not completed, need more input or more output */
+ block_done, /* block flush performed */
+ finish_started, /* finish started, need only more output at next deflate */
+ finish_done /* finish done, accept no more input or output */
+} block_state;
+
+typedef block_state (*compress_func) OF((deflate_state *s, int flush));
+/* Compression function. Returns the block state after the call. */
+
+local void fill_window OF((deflate_state *s));
+local block_state deflate_stored OF((deflate_state *s, int flush));
+local block_state deflate_fast OF((deflate_state *s, int flush));
+#ifndef FASTEST
+local block_state deflate_slow OF((deflate_state *s, int flush));
+#endif
+local void lm_init OF((deflate_state *s));
+local void putShortMSB OF((deflate_state *s, uInt b));
+local void flush_pending OF((z_streamp strm));
+local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
+#ifndef FASTEST
+#ifdef ASMV
+ void match_init OF((void)); /* asm code initialization */
+ uInt longest_match OF((deflate_state *s, IPos cur_match));
+#else
+local uInt longest_match OF((deflate_state *s, IPos cur_match));
+#endif
+#endif
+local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
+
+#ifdef DEBUG
+local void check_match OF((deflate_state *s, IPos start, IPos match,
+ int length));
+#endif
+
+/* ===========================================================================
+ * Local data
+ */
+
+#define NIL 0
+/* Tail of hash chains */
+
+#ifndef TOO_FAR
+# define TOO_FAR 4096
+#endif
+/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+typedef struct config_s {
+ ush good_length; /* reduce lazy search above this match length */
+ ush max_lazy; /* do not perform lazy search above this match length */
+ ush nice_length; /* quit search above this match length */
+ ush max_chain;
+ compress_func func;
+} config;
+
+#ifdef FASTEST
+local const config configuration_table[2] = {
+/* good lazy nice chain */
+/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
+/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */
+#else
+local const config configuration_table[10] = {
+/* good lazy nice chain */
+/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
+/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */
+/* 2 */ {4, 5, 16, 8, deflate_fast},
+/* 3 */ {4, 6, 32, 32, deflate_fast},
+
+/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */
+/* 5 */ {8, 16, 32, 32, deflate_slow},
+/* 6 */ {8, 16, 128, 128, deflate_slow},
+/* 7 */ {8, 32, 128, 256, deflate_slow},
+/* 8 */ {32, 128, 258, 1024, deflate_slow},
+/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
+#endif
+
+/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
+ * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
+ * meaning.
+ */
+
+#define EQUAL 0
+/* result of memcmp for equal strings */
+
+#ifndef NO_DUMMY_DECL
+struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
+#endif
+
+/* ===========================================================================
+ * Update a hash value with the given input byte
+ * IN assertion: all calls to to UPDATE_HASH are made with consecutive
+ * input characters, so that a running hash key can be computed from the
+ * previous key instead of complete recalculation each time.
+ */
+#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
+
+
+/* ===========================================================================
+ * Insert string str in the dictionary and set match_head to the previous head
+ * of the hash chain (the most recent string with same hash key). Return
+ * the previous length of the hash chain.
+ * If this file is compiled with -DFASTEST, the compression level is forced
+ * to 1, and no hash chains are maintained.
+ * IN assertion: all calls to to INSERT_STRING are made with consecutive
+ * input characters and the first MIN_MATCH bytes of str are valid
+ * (except for the last MIN_MATCH-1 bytes of the input file).
+ */
+#ifdef FASTEST
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ match_head = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#else
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#endif
+
+/* ===========================================================================
+ * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
+ * prev[] will be initialized on the fly.
+ */
+#define CLEAR_HASH(s) \
+ s->head[s->hash_size-1] = NIL; \
+ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+
+/* ========================================================================= */
+int ZEXPORT deflateInit_(strm, level, version, stream_size)
+ z_streamp strm;
+ int level;
+ const char *version;
+ int stream_size;
+{
+ return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
+ Z_DEFAULT_STRATEGY, version, stream_size);
+ /* To do: ignore strm->next_in if we use it as window */
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ version, stream_size)
+ z_streamp strm;
+ int level;
+ int method;
+ int windowBits;
+ int memLevel;
+ int strategy;
+ const char *version;
+ int stream_size;
+{
+ deflate_state *s;
+ int wrap = 1;
+ static const char my_version[] = ZLIB_VERSION;
+
+ ushf *overlay;
+ /* We overlay pending_buf and d_buf+l_buf. This works since the average
+ * output size for (length,distance) codes is <= 24 bits.
+ */
+
+ if (version == Z_NULL || version[0] != my_version[0] ||
+ stream_size != sizeof(z_stream)) {
+ return Z_VERSION_ERROR;
+ }
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+
+ strm->msg = Z_NULL;
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+
+#ifdef FASTEST
+ if (level != 0) level = 1;
+#else
+ if (level == Z_DEFAULT_COMPRESSION) level = 6;
+#endif
+
+ if (windowBits < 0) { /* suppress zlib wrapper */
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+#ifdef GZIP
+ else if (windowBits > 15) {
+ wrap = 2; /* write gzip wrapper instead */
+ windowBits -= 16;
+ }
+#endif
+ if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
+ windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_FIXED) {
+ return Z_STREAM_ERROR;
+ }
+ if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
+ s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
+ if (s == Z_NULL) return Z_MEM_ERROR;
+ strm->state = (struct internal_state FAR *)s;
+ s->strm = strm;
+
+ s->wrap = wrap;
+ s->gzhead = Z_NULL;
+ s->w_bits = windowBits;
+ s->w_size = 1 << s->w_bits;
+ s->w_mask = s->w_size - 1;
+
+ s->hash_bits = memLevel + 7;
+ s->hash_size = 1 << s->hash_bits;
+ s->hash_mask = s->hash_size - 1;
+ s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
+
+ s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
+ s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
+ s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
+
+ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+ s->pending_buf = (uchf *) overlay;
+ s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
+
+ if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
+ s->pending_buf == Z_NULL) {
+ s->status = FINISH_STATE;
+ strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ deflateEnd (strm);
+ return Z_MEM_ERROR;
+ }
+ s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
+ s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
+
+ s->level = level;
+ s->strategy = strategy;
+ s->method = (Byte)method;
+
+ return deflateReset(strm);
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
+ z_streamp strm;
+ const Bytef *dictionary;
+ uInt dictLength;
+{
+ deflate_state *s;
+ uInt length = dictLength;
+ uInt n;
+ IPos hash_head = 0;
+
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
+ strm->state->wrap == 2 ||
+ (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
+ return Z_STREAM_ERROR;
+
+ s = strm->state;
+ if (s->wrap)
+ strm->adler = adler32(strm->adler, dictionary, dictLength);
+
+ if (length < MIN_MATCH) return Z_OK;
+ if (length > MAX_DIST(s)) {
+ length = MAX_DIST(s);
+ dictionary += dictLength - length; /* use the tail of the dictionary */
+ }
+ zmemcpy(s->window, dictionary, length);
+ s->strstart = length;
+ s->block_start = (long)length;
+
+ /* Insert all strings in the hash table (except for the last two bytes).
+ * s->lookahead stays null, so s->ins_h will be recomputed at the next
+ * call of fill_window.
+ */
+ s->ins_h = s->window[0];
+ UPDATE_HASH(s, s->ins_h, s->window[1]);
+ for (n = 0; n <= length - MIN_MATCH; n++) {
+ INSERT_STRING(s, n, hash_head);
+ }
+ if (hash_head) hash_head = 0; /* to make compiler happy */
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL ||
+ strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
+ return Z_STREAM_ERROR;
+ }
+
+ strm->total_in = strm->total_out = 0;
+ strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
+ strm->data_type = Z_UNKNOWN;
+
+ s = (deflate_state *)strm->state;
+ s->pending = 0;
+ s->pending_out = s->pending_buf;
+
+ if (s->wrap < 0) {
+ s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
+ }
+ s->status = s->wrap ? INIT_STATE : BUSY_STATE;
+ strm->adler =
+#ifdef GZIP
+ s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
+#endif
+ adler32(0L, Z_NULL, 0);
+ s->last_flush = Z_NO_FLUSH;
+
+ _tr_init(s);
+ lm_init(s);
+
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateSetHeader (strm, head)
+ z_streamp strm;
+ gz_headerp head;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (strm->state->wrap != 2) return Z_STREAM_ERROR;
+ strm->state->gzhead = head;
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflatePrime (strm, bits, value)
+ z_streamp strm;
+ int bits;
+ int value;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ strm->state->bi_valid = bits;
+ strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateParams(strm, level, strategy)
+ z_streamp strm;
+ int level;
+ int strategy;
+{
+ deflate_state *s;
+ compress_func func;
+ int err = Z_OK;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ s = strm->state;
+
+#ifdef FASTEST
+ if (level != 0) level = 1;
+#else
+ if (level == Z_DEFAULT_COMPRESSION) level = 6;
+#endif
+ if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
+ return Z_STREAM_ERROR;
+ }
+ func = configuration_table[s->level].func;
+
+ if (func != configuration_table[level].func && strm->total_in != 0) {
+ /* Flush the last buffer: */
+ err = deflate(strm, Z_PARTIAL_FLUSH);
+ }
+ if (s->level != level) {
+ s->level = level;
+ s->max_lazy_match = configuration_table[level].max_lazy;
+ s->good_match = configuration_table[level].good_length;
+ s->nice_match = configuration_table[level].nice_length;
+ s->max_chain_length = configuration_table[level].max_chain;
+ }
+ s->strategy = strategy;
+ return err;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
+ z_streamp strm;
+ int good_length;
+ int max_lazy;
+ int nice_length;
+ int max_chain;
+{
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ s = strm->state;
+ s->good_match = good_length;
+ s->max_lazy_match = max_lazy;
+ s->nice_match = nice_length;
+ s->max_chain_length = max_chain;
+ return Z_OK;
+}
+
+/* =========================================================================
+ * For the default windowBits of 15 and memLevel of 8, this function returns
+ * a close to exact, as well as small, upper bound on the compressed size.
+ * They are coded as constants here for a reason--if the #define's are
+ * changed, then this function needs to be changed as well. The return
+ * value for 15 and 8 only works for those exact settings.
+ *
+ * For any setting other than those defaults for windowBits and memLevel,
+ * the value returned is a conservative worst case for the maximum expansion
+ * resulting from using fixed blocks instead of stored blocks, which deflate
+ * can emit on compressed data for some combinations of the parameters.
+ *
+ * This function could be more sophisticated to provide closer upper bounds
+ * for every combination of windowBits and memLevel, as well as wrap.
+ * But even the conservative upper bound of about 14% expansion does not
+ * seem onerous for output buffer allocation.
+ */
+uLong ZEXPORT deflateBound(strm, sourceLen)
+ z_streamp strm;
+ uLong sourceLen;
+{
+ deflate_state *s;
+ uLong destLen;
+
+ /* conservative upper bound */
+ destLen = sourceLen +
+ ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
+
+ /* if can't get parameters, return conservative bound */
+ if (strm == Z_NULL || strm->state == Z_NULL)
+ return destLen;
+
+ /* if not default parameters, return conservative bound */
+ s = strm->state;
+ if (s->w_bits != 15 || s->hash_bits != 8 + 7)
+ return destLen;
+
+ /* default settings: return tight bound for that case */
+ return compressBound(sourceLen);
+}
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+local void putShortMSB (s, b)
+ deflate_state *s;
+ uInt b;
+{
+ put_byte(s, (Byte)(b >> 8));
+ put_byte(s, (Byte)(b & 0xff));
+}
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output goes
+ * through this function so some applications may wish to modify it
+ * to avoid allocating a large strm->next_out buffer and copying into it.
+ * (See also read_buf()).
+ */
+local void flush_pending(strm)
+ z_streamp strm;
+{
+ unsigned len = strm->state->pending;
+
+ if (len > strm->avail_out) len = strm->avail_out;
+ if (len == 0) return;
+
+ zmemcpy(strm->next_out, strm->state->pending_out, len);
+ strm->next_out += len;
+ strm->state->pending_out += len;
+ strm->total_out += len;
+ strm->avail_out -= len;
+ strm->state->pending -= len;
+ if (strm->state->pending == 0) {
+ strm->state->pending_out = strm->state->pending_buf;
+ }
+}
+
+/* ========================================================================= */
+int ZEXPORT deflate (strm, flush)
+ z_streamp strm;
+ int flush;
+{
+ int old_flush; /* value of flush param for previous deflate call */
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL ||
+ flush > Z_FINISH || flush < 0) {
+ return Z_STREAM_ERROR;
+ }
+ s = strm->state;
+
+ if (strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0) ||
+ (s->status == FINISH_STATE && flush != Z_FINISH)) {
+ ERR_RETURN(strm, Z_STREAM_ERROR);
+ }
+ if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
+
+ s->strm = strm; /* just in case */
+ old_flush = s->last_flush;
+ s->last_flush = flush;
+
+ /* Write the header */
+ if (s->status == INIT_STATE) {
+#ifdef GZIP
+ if (s->wrap == 2) {
+ strm->adler = crc32(0L, Z_NULL, 0);
+ put_byte(s, 31);
+ put_byte(s, 139);
+ put_byte(s, 8);
+ if (s->gzhead == NULL) {
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, s->level == 9 ? 2 :
+ (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
+ 4 : 0));
+ put_byte(s, OS_CODE);
+ s->status = BUSY_STATE;
+ }
+ else {
+ put_byte(s, (s->gzhead->text ? 1 : 0) +
+ (s->gzhead->hcrc ? 2 : 0) +
+ (s->gzhead->extra == Z_NULL ? 0 : 4) +
+ (s->gzhead->name == Z_NULL ? 0 : 8) +
+ (s->gzhead->comment == Z_NULL ? 0 : 16)
+ );
+ put_byte(s, (Byte)(s->gzhead->time & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
+ put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
+ put_byte(s, s->level == 9 ? 2 :
+ (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
+ 4 : 0));
+ put_byte(s, s->gzhead->os & 0xff);
+ if (s->gzhead->extra != NULL) {
+ put_byte(s, s->gzhead->extra_len & 0xff);
+ put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
+ }
+ if (s->gzhead->hcrc)
+ strm->adler = crc32(strm->adler, s->pending_buf,
+ s->pending);
+ s->gzindex = 0;
+ s->status = EXTRA_STATE;
+ }
+ }
+ else
+#endif
+ {
+ uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
+ uInt level_flags;
+
+ if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
+ level_flags = 0;
+ else if (s->level < 6)
+ level_flags = 1;
+ else if (s->level == 6)
+ level_flags = 2;
+ else
+ level_flags = 3;
+ header |= (level_flags << 6);
+ if (s->strstart != 0) header |= PRESET_DICT;
+ header += 31 - (header % 31);
+
+ s->status = BUSY_STATE;
+ putShortMSB(s, header);
+
+ /* Save the adler32 of the preset dictionary: */
+ if (s->strstart != 0) {
+ putShortMSB(s, (uInt)(strm->adler >> 16));
+ putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ strm->adler = adler32(0L, Z_NULL, 0);
+ }
+ }
+#ifdef GZIP
+ if (s->status == EXTRA_STATE) {
+ if (s->gzhead->extra != NULL) {
+ uInt beg = s->pending; /* start of bytes to update crc */
+
+ while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
+ if (s->pending == s->pending_buf_size) {
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ flush_pending(strm);
+ beg = s->pending;
+ if (s->pending == s->pending_buf_size)
+ break;
+ }
+ put_byte(s, s->gzhead->extra[s->gzindex]);
+ s->gzindex++;
+ }
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ if (s->gzindex == s->gzhead->extra_len) {
+ s->gzindex = 0;
+ s->status = NAME_STATE;
+ }
+ }
+ else
+ s->status = NAME_STATE;
+ }
+ if (s->status == NAME_STATE) {
+ if (s->gzhead->name != NULL) {
+ uInt beg = s->pending; /* start of bytes to update crc */
+ int val;
+
+ do {
+ if (s->pending == s->pending_buf_size) {
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ flush_pending(strm);
+ beg = s->pending;
+ if (s->pending == s->pending_buf_size) {
+ val = 1;
+ break;
+ }
+ }
+ val = s->gzhead->name[s->gzindex++];
+ put_byte(s, val);
+ } while (val != 0);
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ if (val == 0) {
+ s->gzindex = 0;
+ s->status = COMMENT_STATE;
+ }
+ }
+ else
+ s->status = COMMENT_STATE;
+ }
+ if (s->status == COMMENT_STATE) {
+ if (s->gzhead->comment != NULL) {
+ uInt beg = s->pending; /* start of bytes to update crc */
+ int val;
+
+ do {
+ if (s->pending == s->pending_buf_size) {
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ flush_pending(strm);
+ beg = s->pending;
+ if (s->pending == s->pending_buf_size) {
+ val = 1;
+ break;
+ }
+ }
+ val = s->gzhead->comment[s->gzindex++];
+ put_byte(s, val);
+ } while (val != 0);
+ if (s->gzhead->hcrc && s->pending > beg)
+ strm->adler = crc32(strm->adler, s->pending_buf + beg,
+ s->pending - beg);
+ if (val == 0)
+ s->status = HCRC_STATE;
+ }
+ else
+ s->status = HCRC_STATE;
+ }
+ if (s->status == HCRC_STATE) {
+ if (s->gzhead->hcrc) {
+ if (s->pending + 2 > s->pending_buf_size)
+ flush_pending(strm);
+ if (s->pending + 2 <= s->pending_buf_size) {
+ put_byte(s, (Byte)(strm->adler & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
+ strm->adler = crc32(0L, Z_NULL, 0);
+ s->status = BUSY_STATE;
+ }
+ }
+ else
+ s->status = BUSY_STATE;
+ }
+#endif
+
+ /* Flush as much pending output as possible */
+ if (s->pending != 0) {
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ /* Since avail_out is 0, deflate will be called again with
+ * more output space, but possibly with both pending and
+ * avail_in equal to zero. There won't be anything to do,
+ * but this is not an error situation so make sure we
+ * return OK instead of BUF_ERROR at next call of deflate:
+ */
+ s->last_flush = -1;
+ return Z_OK;
+ }
+
+ /* Make sure there is something to do and avoid duplicate consecutive
+ * flushes. For repeated and useless calls with Z_FINISH, we keep
+ * returning Z_STREAM_END instead of Z_BUF_ERROR.
+ */
+ } else if (strm->avail_in == 0 && flush <= old_flush &&
+ flush != Z_FINISH) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* User must not provide more input after the first FINISH: */
+ if (s->status == FINISH_STATE && strm->avail_in != 0) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* Start a new block or continue the current one.
+ */
+ if (strm->avail_in != 0 || s->lookahead != 0 ||
+ (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
+ block_state bstate;
+
+ bstate = (*(configuration_table[s->level].func))(s, flush);
+
+ if (bstate == finish_started || bstate == finish_done) {
+ s->status = FINISH_STATE;
+ }
+ if (bstate == need_more || bstate == finish_started) {
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
+ }
+ return Z_OK;
+ /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+ * of deflate should use the same flush parameter to make sure
+ * that the flush is complete. So we don't have to output an
+ * empty block here, this will be done at next call. This also
+ * ensures that for a very small output buffer, we emit at most
+ * one empty block.
+ */
+ }
+ if (bstate == block_done) {
+ if (flush == Z_PARTIAL_FLUSH) {
+ _tr_align(s);
+ } else { /* FULL_FLUSH or SYNC_FLUSH */
+ _tr_stored_block(s, (char*)0, 0L, 0);
+ /* For a full flush, this empty block will be recognized
+ * as a special marker by inflate_sync().
+ */
+ if (flush == Z_FULL_FLUSH) {
+ CLEAR_HASH(s); /* forget history */
+ }
+ }
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+ return Z_OK;
+ }
+ }
+ }
+ Assert(strm->avail_out > 0, "bug2");
+
+ if (flush != Z_FINISH) return Z_OK;
+ if (s->wrap <= 0) return Z_STREAM_END;
+
+ /* Write the trailer */
+#ifdef GZIP
+ if (s->wrap == 2) {
+ put_byte(s, (Byte)(strm->adler & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
+ put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
+ put_byte(s, (Byte)(strm->total_in & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
+ put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
+ }
+ else
+#endif
+ {
+ putShortMSB(s, (uInt)(strm->adler >> 16));
+ putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ flush_pending(strm);
+ /* If avail_out is zero, the application will call deflate again
+ * to flush the rest.
+ */
+ if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
+ return s->pending != 0 ? Z_OK : Z_STREAM_END;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateEnd (strm)
+ z_streamp strm;
+{
+ int status;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+
+ status = strm->state->status;
+ if (status != INIT_STATE &&
+ status != EXTRA_STATE &&
+ status != NAME_STATE &&
+ status != COMMENT_STATE &&
+ status != HCRC_STATE &&
+ status != BUSY_STATE &&
+ status != FINISH_STATE) {
+ return Z_STREAM_ERROR;
+ }
+
+ /* Deallocate in reverse order of allocations: */
+ TRY_FREE(strm, strm->state->pending_buf);
+ TRY_FREE(strm, strm->state->head);
+ TRY_FREE(strm, strm->state->prev);
+ TRY_FREE(strm, strm->state->window);
+
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+
+ return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
+}
+
+/* =========================================================================
+ * Copy the source state to the destination state.
+ * To simplify the source, this is not supported for 16-bit MSDOS (which
+ * doesn't have enough memory anyway to duplicate compression states).
+ */
+int ZEXPORT deflateCopy (dest, source)
+ z_streamp dest;
+ z_streamp source;
+{
+#ifdef MAXSEG_64K
+ return Z_STREAM_ERROR;
+#else
+ deflate_state *ds;
+ deflate_state *ss;
+ ushf *overlay;
+
+
+ if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
+ return Z_STREAM_ERROR;
+ }
+
+ ss = source->state;
+
+ zmemcpy(dest, source, sizeof(z_stream));
+
+ ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
+ if (ds == Z_NULL) return Z_MEM_ERROR;
+ dest->state = (struct internal_state FAR *) ds;
+ zmemcpy(ds, ss, sizeof(deflate_state));
+ ds->strm = dest;
+
+ ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
+ ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
+ ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
+ overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
+ ds->pending_buf = (uchf *) overlay;
+
+ if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
+ ds->pending_buf == Z_NULL) {
+ deflateEnd (dest);
+ return Z_MEM_ERROR;
+ }
+ /* following zmemcpy do not work for 16-bit MSDOS */
+ zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
+ zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
+ zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
+ zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
+
+ ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
+ ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
+ ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
+
+ ds->l_desc.dyn_tree = ds->dyn_ltree;
+ ds->d_desc.dyn_tree = ds->dyn_dtree;
+ ds->bl_desc.dyn_tree = ds->bl_tree;
+
+ return Z_OK;
+#endif /* MAXSEG_64K */
+}
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read. All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->next_in buffer and copying from it.
+ * (See also flush_pending()).
+ */
+local int read_buf(strm, buf, size)
+ z_streamp strm;
+ Bytef *buf;
+ unsigned size;
+{
+ unsigned len = strm->avail_in;
+
+ if (len > size) len = size;
+ if (len == 0) return 0;
+
+ strm->avail_in -= len;
+
+ if (strm->state->wrap == 1) {
+ strm->adler = adler32(strm->adler, strm->next_in, len);
+ }
+#ifdef GZIP
+ else if (strm->state->wrap == 2) {
+ strm->adler = crc32(strm->adler, strm->next_in, len);
+ }
+#endif
+ zmemcpy(buf, strm->next_in, len);
+ strm->next_in += len;
+ strm->total_in += len;
+
+ return (int)len;
+}
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+local void lm_init (s)
+ deflate_state *s;
+{
+ s->window_size = (ulg)2L*s->w_size;
+
+ CLEAR_HASH(s);
+
+ /* Set the default configuration parameters:
+ */
+ s->max_lazy_match = configuration_table[s->level].max_lazy;
+ s->good_match = configuration_table[s->level].good_length;
+ s->nice_match = configuration_table[s->level].nice_length;
+ s->max_chain_length = configuration_table[s->level].max_chain;
+
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ s->ins_h = 0;
+#ifndef FASTEST
+#ifdef ASMV
+ match_init(); /* initialize the asm code */
+#endif
+#endif
+}
+
+#ifndef FASTEST
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+#ifndef ASMV
+/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
+ * match.S. The code will be functionally equivalent.
+ */
+local uInt longest_match(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ unsigned chain_length = s->max_chain_length;/* max hash chain length */
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ int best_len = s->prev_length; /* best match length so far */
+ int nice_match = s->nice_match; /* stop if match long enough */
+ IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+ s->strstart - (IPos)MAX_DIST(s) : NIL;
+ /* Stop when cur_match becomes <= limit. To simplify the code,
+ * we prevent matches with the string of window index 0.
+ */
+ Posf *prev = s->prev;
+ uInt wmask = s->w_mask;
+
+#ifdef UNALIGNED_OK
+ /* Compare two bytes at a time. Note: this is not always beneficial.
+ * Try with and without -DUNALIGNED_OK to check.
+ */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
+ register ush scan_start = *(ushf*)scan;
+ register ush scan_end = *(ushf*)(scan+best_len-1);
+#else
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+ register Byte scan_end1 = scan[best_len-1];
+ register Byte scan_end = scan[best_len];
+#endif
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ /* Do not waste too much time if we already have a good match: */
+ if (s->prev_length >= s->good_match) {
+ chain_length >>= 2;
+ }
+ /* Do not look for matches beyond the end of the input. This is necessary
+ * to make deflate deterministic.
+ */
+ if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ do {
+ Assert(cur_match < s->strstart, "no future");
+ match = s->window + cur_match;
+
+ /* Skip to next match if the match length cannot increase
+ * or if the match length is less than 2. Note that the checks below
+ * for insufficient lookahead only occur occasionally for performance
+ * reasons. Therefore uninitialized memory will be accessed, and
+ * conditional jumps will be made that depend on those values.
+ * However the length of the match is limited to the lookahead, so
+ * the output of deflate is not affected by the uninitialized values.
+ */
+#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
+ /* This code assumes sizeof(unsigned short) == 2. Do not use
+ * UNALIGNED_OK if your compiler uses a different size.
+ */
+ if (*(ushf*)(match+best_len-1) != scan_end ||
+ *(ushf*)match != scan_start) continue;
+
+ /* It is not necessary to compare scan[2] and match[2] since they are
+ * always equal when the other bytes match, given that the hash keys
+ * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
+ * strstart+3, +5, ... up to strstart+257. We check for insufficient
+ * lookahead only every 4th comparison; the 128th check will be made
+ * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
+ * necessary to put more guard bytes at the end of the window, or
+ * to check more often for insufficient lookahead.
+ */
+ Assert(scan[2] == match[2], "scan[2]?");
+ scan++, match++;
+ do {
+ } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ scan < strend);
+ /* The funny "do {}" generates better code on most compilers */
+
+ /* Here, scan <= window+strstart+257 */
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+ if (*scan == *match) scan++;
+
+ len = (MAX_MATCH - 1) - (int)(strend-scan);
+ scan = strend - (MAX_MATCH-1);
+
+#else /* UNALIGNED_OK */
+
+ if (match[best_len] != scan_end ||
+ match[best_len-1] != scan_end1 ||
+ *match != *scan ||
+ *++match != scan[1]) continue;
+
+ /* The check at best_len-1 can be removed because it will be made
+ * again later. (This heuristic is not always a win.)
+ * It is not necessary to compare scan[2] and match[2] since they
+ * are always equal when the other bytes match, given that
+ * the hash keys are equal and that HASH_BITS >= 8.
+ */
+ scan += 2, match++;
+ Assert(*scan == *match, "match[2]?");
+
+ /* We check for insufficient lookahead only every 8th comparison;
+ * the 256th check will be made at strstart+258.
+ */
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+ scan = strend - MAX_MATCH;
+
+#endif /* UNALIGNED_OK */
+
+ if (len > best_len) {
+ s->match_start = cur_match;
+ best_len = len;
+ if (len >= nice_match) break;
+#ifdef UNALIGNED_OK
+ scan_end = *(ushf*)(scan+best_len-1);
+#else
+ scan_end1 = scan[best_len-1];
+ scan_end = scan[best_len];
+#endif
+ }
+ } while ((cur_match = prev[cur_match & wmask]) > limit
+ && --chain_length != 0);
+
+ if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+ return s->lookahead;
+}
+#endif /* ASMV */
+#endif /* FASTEST */
+
+/* ---------------------------------------------------------------------------
+ * Optimized version for level == 1 or strategy == Z_RLE only
+ */
+local uInt longest_match_fast(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ Assert(cur_match < s->strstart, "no future");
+
+ match = s->window + cur_match;
+
+ /* Return failure if the match length is less than 2:
+ */
+ if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
+
+ /* The check at best_len-1 can be removed because it will be made
+ * again later. (This heuristic is not always a win.)
+ * It is not necessary to compare scan[2] and match[2] since they
+ * are always equal when the other bytes match, given that
+ * the hash keys are equal and that HASH_BITS >= 8.
+ */
+ scan += 2, match += 2;
+ Assert(*scan == *match, "match[2]?");
+
+ /* We check for insufficient lookahead only every 8th comparison;
+ * the 256th check will be made at strstart+258.
+ */
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+
+ if (len < MIN_MATCH) return MIN_MATCH - 1;
+
+ s->match_start = cur_match;
+ return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
+}
+
+#ifdef DEBUG
+/* ===========================================================================
+ * Check that the match at match_start is indeed a match.
+ */
+local void check_match(s, start, match, length)
+ deflate_state *s;
+ IPos start, match;
+ int length;
+{
+ /* check that the match is indeed a match */
+ if (zmemcmp(s->window + match,
+ s->window + start, length) != EQUAL) {
+ fprintf(stderr, " start %u, match %u, length %d\n",
+ start, match, length);
+ do {
+ fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
+ } while (--length != 0);
+ z_error("invalid match");
+ }
+ if (z_verbose > 1) {
+ fprintf(stderr,"\\[%d,%d]", start-match, length);
+ do { putc(s->window[start++], stderr); } while (--length != 0);
+ }
+}
+#else
+# define check_match(s, start, match, length)
+#endif /* DEBUG */
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ * At least one byte has been read, or avail_in == 0; reads are
+ * performed for at least two bytes (required for the zip translate_eol
+ * option -- not supported here).
+ */
+local void fill_window(s)
+ deflate_state *s;
+{
+ register unsigned n, m;
+ register Posf *p;
+ unsigned more; /* Amount of free space at the end of the window. */
+ uInt wsize = s->w_size;
+
+ do {
+ more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
+
+ /* Deal with !@#$% 64K limit: */
+ if (sizeof(int) <= 2) {
+ if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+ more = wsize;
+
+ } else if (more == (unsigned)(-1)) {
+ /* Very unlikely, but possible on 16 bit machine if
+ * strstart == 0 && lookahead == 1 (input done a byte at time)
+ */
+ more--;
+ }
+ }
+
+ /* If the window is almost full and there is insufficient lookahead,
+ * move the upper half to the lower one to make room in the upper half.
+ */
+ if (s->strstart >= wsize+MAX_DIST(s)) {
+
+ zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
+ s->match_start -= wsize;
+ s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
+ s->block_start -= (long) wsize;
+
+ /* Slide the hash table (could be avoided with 32 bit values
+ at the expense of memory usage). We slide even when level == 0
+ to keep the hash table consistent if we switch back to level > 0
+ later. (Using level 0 permanently is not an optimal usage of
+ zlib, so we don't care about this pathological case.)
+ */
+ /* %%% avoid this when Z_RLE */
+ n = s->hash_size;
+ p = &s->head[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ } while (--n);
+
+ n = wsize;
+#ifndef FASTEST
+ p = &s->prev[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ /* If n is not on any hash chain, prev[n] is garbage but
+ * its value will never be used.
+ */
+ } while (--n);
+#endif
+ more += wsize;
+ }
+ if (s->strm->avail_in == 0) return;
+
+ /* If there was no sliding:
+ * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+ * more == window_size - lookahead - strstart
+ * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+ * => more >= window_size - 2*WSIZE + 2
+ * In the BIG_MEM or MMAP case (not yet supported),
+ * window_size == input_size + MIN_LOOKAHEAD &&
+ * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+ * Otherwise, window_size == 2*WSIZE so more >= 2.
+ * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+ */
+ Assert(more >= 2, "more < 2");
+
+ n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
+ s->lookahead += n;
+
+ /* Initialize the hash value now that we have some input: */
+ if (s->lookahead >= MIN_MATCH) {
+ s->ins_h = s->window[s->strstart];
+ UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+#if MIN_MATCH != 3
+ Call UPDATE_HASH() MIN_MATCH-3 more times
+#endif
+ }
+ /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+ * but this is not important since only literal bytes will be emitted.
+ */
+
+ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
+}
+
+/* ===========================================================================
+ * Flush the current block, with given end-of-file flag.
+ * IN assertion: strstart is set to the end of the current match.
+ */
+#define FLUSH_BLOCK_ONLY(s, eof) { \
+ _tr_flush_block(s, (s->block_start >= 0L ? \
+ (charf *)&s->window[(unsigned)s->block_start] : \
+ (charf *)Z_NULL), \
+ (ulg)((long)s->strstart - s->block_start), \
+ (eof)); \
+ s->block_start = s->strstart; \
+ flush_pending(s->strm); \
+ Tracev((stderr,"[FLUSH]")); \
+}
+
+/* Same but force premature exit if necessary. */
+#define FLUSH_BLOCK(s, eof) { \
+ FLUSH_BLOCK_ONLY(s, eof); \
+ if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+}
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ * This function does not insert new strings in the dictionary since
+ * uncompressible data is probably not useful. This function is used
+ * only for the level=0 compression option.
+ * NOTE: this function should be optimized to avoid extra copying from
+ * window to pending_buf.
+ */
+local block_state deflate_stored(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
+ * to pending_buf_size, and each stored block has a 5 byte header:
+ */
+ ulg max_block_size = 0xffff;
+ ulg max_start;
+
+ if (max_block_size > s->pending_buf_size - 5) {
+ max_block_size = s->pending_buf_size - 5;
+ }
+
+ /* Copy as much as possible from input to output: */
+ for (;;) {
+ /* Fill the window as much as possible: */
+ if (s->lookahead <= 1) {
+
+ Assert(s->strstart < s->w_size+MAX_DIST(s) ||
+ s->block_start >= (long)s->w_size, "slide too late");
+
+ fill_window(s);
+ if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
+
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+ Assert(s->block_start >= 0L, "block gone");
+
+ s->strstart += s->lookahead;
+ s->lookahead = 0;
+
+ /* Emit a stored block if pending_buf will be full: */
+ max_start = s->block_start + max_block_size;
+ if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
+ /* strstart == 0 is possible when wraparound on 16-bit machine */
+ s->lookahead = (uInt)(s->strstart - max_start);
+ s->strstart = (uInt)max_start;
+ FLUSH_BLOCK(s, 0);
+ }
+ /* Flush if we may have to slide, otherwise block_start may become
+ * negative and the data will be gone:
+ */
+ if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
+ FLUSH_BLOCK(s, 0);
+ }
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+local block_state deflate_fast(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ IPos hash_head = NIL; /* head of the hash chain */
+ int bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s->lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ if (s->lookahead >= MIN_MATCH) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ * At this point we have always match_length < MIN_MATCH
+ */
+ if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+#ifdef FASTEST
+ if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
+ (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+#else
+ if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
+ s->match_length = longest_match (s, hash_head);
+ } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+#endif
+ /* longest_match() or longest_match_fast() sets match_start */
+ }
+ if (s->match_length >= MIN_MATCH) {
+ check_match(s, s->strstart, s->match_start, s->match_length);
+
+ _tr_tally_dist(s, s->strstart - s->match_start,
+ s->match_length - MIN_MATCH, bflush);
+
+ s->lookahead -= s->match_length;
+
+ /* Insert new strings in the hash table only if the match length
+ * is not too large. This saves time but degrades compression.
+ */
+#ifndef FASTEST
+ if (s->match_length <= s->max_insert_length &&
+ s->lookahead >= MIN_MATCH) {
+ s->match_length--; /* string at strstart already in table */
+ do {
+ s->strstart++;
+ INSERT_STRING(s, s->strstart, hash_head);
+ /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+ * always MIN_MATCH bytes ahead.
+ */
+ } while (--s->match_length != 0);
+ s->strstart++;
+ } else
+#endif
+ {
+ s->strstart += s->match_length;
+ s->match_length = 0;
+ s->ins_h = s->window[s->strstart];
+ UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+#if MIN_MATCH != 3
+ Call UPDATE_HASH() MIN_MATCH-3 more times
+#endif
+ /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+ * matter since it will be recomputed at next deflate call.
+ */
+ }
+ } else {
+ /* No match, output a literal byte */
+ Tracevv((stderr,"%c", s->window[s->strstart]));
+ _tr_tally_lit (s, s->window[s->strstart], bflush);
+ s->lookahead--;
+ s->strstart++;
+ }
+ if (bflush) FLUSH_BLOCK(s, 0);
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+
+#ifndef FASTEST
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+local block_state deflate_slow(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ IPos hash_head = NIL; /* head of hash chain */
+ int bflush; /* set if current block must be flushed */
+
+ /* Process the input block. */
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s->lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ if (s->lookahead >= MIN_MATCH) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ */
+ s->prev_length = s->match_length, s->prev_match = s->match_start;
+ s->match_length = MIN_MATCH-1;
+
+ if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
+ s->strstart - hash_head <= MAX_DIST(s)) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+ if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
+ s->match_length = longest_match (s, hash_head);
+ } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
+ s->match_length = longest_match_fast (s, hash_head);
+ }
+ /* longest_match() or longest_match_fast() sets match_start */
+
+ if (s->match_length <= 5 && (s->strategy == Z_FILTERED
+#if TOO_FAR <= 32767
+ || (s->match_length == MIN_MATCH &&
+ s->strstart - s->match_start > TOO_FAR)
+#endif
+ )) {
+
+ /* If prev_match is also MIN_MATCH, match_start is garbage
+ * but we will ignore the current match anyway.
+ */
+ s->match_length = MIN_MATCH-1;
+ }
+ }
+ /* If there was a match at the previous step and the current
+ * match is not better, output the previous match:
+ */
+ if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
+ uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
+ /* Do not insert strings in hash table beyond this. */
+
+ check_match(s, s->strstart-1, s->prev_match, s->prev_length);
+
+ _tr_tally_dist(s, s->strstart -1 - s->prev_match,
+ s->prev_length - MIN_MATCH, bflush);
+
+ /* Insert in hash table all strings up to the end of the match.
+ * strstart-1 and strstart are already inserted. If there is not
+ * enough lookahead, the last two strings are not inserted in
+ * the hash table.
+ */
+ s->lookahead -= s->prev_length-1;
+ s->prev_length -= 2;
+ do {
+ if (++s->strstart <= max_insert) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+ } while (--s->prev_length != 0);
+ s->match_available = 0;
+ s->match_length = MIN_MATCH-1;
+ s->strstart++;
+
+ if (bflush) FLUSH_BLOCK(s, 0);
+
+ } else if (s->match_available) {
+ /* If there was no match at the previous position, output a
+ * single literal. If there was a match but the current match
+ * is longer, truncate the previous match to a single literal.
+ */
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ if (bflush) {
+ FLUSH_BLOCK_ONLY(s, 0);
+ }
+ s->strstart++;
+ s->lookahead--;
+ if (s->strm->avail_out == 0) return need_more;
+ } else {
+ /* There is no previous match to compare with, wait for
+ * the next step to decide.
+ */
+ s->match_available = 1;
+ s->strstart++;
+ s->lookahead--;
+ }
+ }
+ Assert (flush != Z_NO_FLUSH, "no flush?");
+ if (s->match_available) {
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ s->match_available = 0;
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+#endif /* FASTEST */
+
+#if 0
+/* ===========================================================================
+ * For Z_RLE, simply look for runs of bytes, generate matches only of distance
+ * one. Do not maintain a hash table. (It will be regenerated if this run of
+ * deflate switches away from Z_RLE.)
+ */
+local block_state deflate_rle(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ int bflush; /* set if current block must be flushed */
+ uInt run; /* length of run */
+ uInt max; /* maximum length of run */
+ uInt prev; /* byte at distance one to match */
+ Bytef *scan; /* scan for end of run */
+
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the longest encodable run.
+ */
+ if (s->lookahead < MAX_MATCH) {
+ fill_window(s);
+ if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+
+ /* See how many times the previous byte repeats */
+ run = 0;
+ if (s->strstart > 0) { /* if there is a previous byte, that is */
+ max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
+ scan = s->window + s->strstart - 1;
+ prev = *scan++;
+ do {
+ if (*scan++ != prev)
+ break;
+ } while (++run < max);
+ }
+
+ /* Emit match if have run of MIN_MATCH or longer, else emit literal */
+ if (run >= MIN_MATCH) {
+ check_match(s, s->strstart, s->strstart - 1, run);
+ _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
+ s->lookahead -= run;
+ s->strstart += run;
+ } else {
+ /* No match, output a literal byte */
+ Tracevv((stderr,"%c", s->window[s->strstart]));
+ _tr_tally_lit (s, s->window[s->strstart], bflush);
+ s->lookahead--;
+ s->strstart++;
+ }
+ if (bflush) FLUSH_BLOCK(s, 0);
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
+#endif
+
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/deflate.h b/tinySIGCOMP/src/deflate.h
new file mode 100644
index 0000000..a4fbdfb
--- /dev/null
+++ b/tinySIGCOMP/src/deflate.h
@@ -0,0 +1,335 @@
+#if !HAS_ZLIB
+/* deflate.h -- internal compression state
+ * Copyright (C) 1995-2004 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef DEFLATE_H
+#define DEFLATE_H
+
+#include "zutil.h"
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+ trailer creation by deflate(). NO_GZIP would be used to avoid linking in
+ the crc code when it is not needed. For shared libraries, gzip encoding
+ should be left enabled. */
+#ifndef NO_GZIP
+# define GZIP
+#endif
+
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+#define LENGTH_CODES 29
+/* number of length codes, not counting the special END_BLOCK code */
+
+#define LITERALS 256
+/* number of literal bytes 0..255 */
+
+#define L_CODES (LITERALS+1+LENGTH_CODES)
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+#define D_CODES 30
+/* number of distance codes */
+
+#define BL_CODES 19
+/* number of codes used to transfer the bit lengths */
+
+#define HEAP_SIZE (2*L_CODES+1)
+/* maximum heap size */
+
+#define MAX_BITS 15
+/* All codes must not exceed MAX_BITS bits */
+
+#define INIT_STATE 42
+#define EXTRA_STATE 69
+#define NAME_STATE 73
+#define COMMENT_STATE 91
+#define HCRC_STATE 103
+#define BUSY_STATE 113
+#define FINISH_STATE 666
+/* Stream status */
+
+
+/* Data structure describing a single value and its code string. */
+typedef struct ct_data_s {
+ union {
+ ush freq; /* frequency count */
+ ush code; /* bit string */
+ } fc;
+ union {
+ ush dad; /* father node in Huffman tree */
+ ush len; /* length of bit string */
+ } dl;
+} FAR ct_data;
+
+#define Freq fc.freq
+#define Code fc.code
+#define Dad dl.dad
+#define Len dl.len
+
+typedef struct static_tree_desc_s static_tree_desc;
+
+typedef struct tree_desc_s {
+ ct_data *dyn_tree; /* the dynamic tree */
+ int max_code; /* largest code with non zero frequency */
+ static_tree_desc *stat_desc; /* the corresponding static tree */
+} FAR tree_desc;
+
+typedef ush Pos;
+typedef Pos FAR Posf;
+typedef unsigned IPos;
+
+/* A Pos is an index in the character window. We use short instead of int to
+ * save space in the various tables. IPos is used only for parameter passing.
+ */
+
+typedef struct internal_state {
+ z_streamp strm; /* pointer back to this zlib stream */
+ int status; /* as the name implies */
+ Bytef *pending_buf; /* output still pending */
+ ulg pending_buf_size; /* size of pending_buf */
+ Bytef *pending_out; /* next pending byte to output to the stream */
+ uInt pending; /* nb of bytes in the pending buffer */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ gz_headerp gzhead; /* gzip header information to write */
+ uInt gzindex; /* where in extra, name, or comment */
+ Byte method; /* STORED (for zip only) or DEFLATED */
+ int last_flush; /* value of flush param for previous deflate call */
+
+ /* used by deflate.c: */
+
+ uInt w_size; /* LZ77 window size (32K by default) */
+ uInt w_bits; /* log2(w_size) (8..16) */
+ uInt w_mask; /* w_size - 1 */
+
+ Bytef *window;
+ /* Sliding window. Input bytes are read into the second half of the window,
+ * and move to the first half later to keep a dictionary of at least wSize
+ * bytes. With this organization, matches are limited to a distance of
+ * wSize-MAX_MATCH bytes, but this ensures that IO is always
+ * performed with a length multiple of the block size. Also, it limits
+ * the window size to 64K, which is quite useful on MSDOS.
+ * To do: use the user input buffer as sliding window.
+ */
+
+ ulg window_size;
+ /* Actual size of window: 2*wSize, except when the user input buffer
+ * is directly used as sliding window.
+ */
+
+ Posf *prev;
+ /* Link to older string with same hash index. To limit the size of this
+ * array to 64K, this link is maintained only for the last 32K strings.
+ * An index in this array is thus a window index modulo 32K.
+ */
+
+ Posf *head; /* Heads of the hash chains or NIL. */
+
+ uInt ins_h; /* hash index of string to be inserted */
+ uInt hash_size; /* number of elements in hash table */
+ uInt hash_bits; /* log2(hash_size) */
+ uInt hash_mask; /* hash_size-1 */
+
+ uInt hash_shift;
+ /* Number of bits by which ins_h must be shifted at each input
+ * step. It must be such that after MIN_MATCH steps, the oldest
+ * byte no longer takes part in the hash key, that is:
+ * hash_shift * MIN_MATCH >= hash_bits
+ */
+
+ long block_start;
+ /* Window position at the beginning of the current output block. Gets
+ * negative when the window is moved backwards.
+ */
+
+ uInt match_length; /* length of best match */
+ IPos prev_match; /* previous match */
+ int match_available; /* set if previous match exists */
+ uInt strstart; /* start of string to insert */
+ uInt match_start; /* start of matching string */
+ uInt lookahead; /* number of valid bytes ahead in window */
+
+ uInt prev_length;
+ /* Length of the best match at previous step. Matches not greater than this
+ * are discarded. This is used in the lazy match evaluation.
+ */
+
+ uInt max_chain_length;
+ /* To speed up deflation, hash chains are never searched beyond this
+ * length. A higher limit improves compression ratio but degrades the
+ * speed.
+ */
+
+ uInt max_lazy_match;
+ /* Attempt to find a better match only when the current match is strictly
+ * smaller than this value. This mechanism is used only for compression
+ * levels >= 4.
+ */
+# define max_insert_length max_lazy_match
+ /* Insert new strings in the hash table only if the match length is not
+ * greater than this length. This saves time but degrades compression.
+ * max_insert_length is used only for compression levels <= 3.
+ */
+
+ int level; /* compression level (1..9) */
+ int strategy; /* favor or force Huffman coding*/
+
+ uInt good_match;
+ /* Use a faster search when the previous match is longer than this */
+
+ int nice_match; /* Stop searching when current match exceeds this */
+
+ /* used by trees.c: */
+ /* Didn't use ct_data typedef below to supress compiler warning */
+ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
+ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
+
+ struct tree_desc_s l_desc; /* desc. for literal tree */
+ struct tree_desc_s d_desc; /* desc. for distance tree */
+ struct tree_desc_s bl_desc; /* desc. for bit length tree */
+
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
+ int heap_len; /* number of elements in the heap */
+ int heap_max; /* element of largest frequency */
+ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+ * The same heap array is used to build all trees.
+ */
+
+ uch depth[2*L_CODES+1];
+ /* Depth of each subtree used as tie breaker for trees of equal frequency
+ */
+
+ uchf *l_buf; /* buffer for literals or lengths */
+
+ uInt lit_bufsize;
+ /* Size of match buffer for literals/lengths. There are 4 reasons for
+ * limiting lit_bufsize to 64K:
+ * - frequencies can be kept in 16 bit counters
+ * - if compression is not successful for the first block, all input
+ * data is still in the window so we can still emit a stored block even
+ * when input comes from standard input. (This can also be done for
+ * all blocks if lit_bufsize is not greater than 32K.)
+ * - if compression is not successful for a file smaller than 64K, we can
+ * even emit a stored file instead of a stored block (saving 5 bytes).
+ * This is applicable only for zip (not gzip or zlib).
+ * - creating new Huffman trees less frequently may not provide fast
+ * adaptation to changes in the input data statistics. (Take for
+ * example a binary file with poorly compressible code followed by
+ * a highly compressible string table.) Smaller buffer sizes give
+ * fast adaptation but have of course the overhead of transmitting
+ * trees more frequently.
+ * - I can't count above 4
+ */
+
+ uInt last_lit; /* running index in l_buf */
+
+ ushf *d_buf;
+ /* Buffer for distances. To simplify the code, d_buf and l_buf have
+ * the same number of elements. To use different lengths, an extra flag
+ * array would be necessary.
+ */
+
+ ulg opt_len; /* bit length of current block with optimal trees */
+ ulg static_len; /* bit length of current block with static trees */
+ uInt matches; /* number of string matches in current block */
+ int last_eob_len; /* bit length of EOB code for last block */
+
+#ifdef DEBUG
+ ulg compressed_len; /* total bit length of compressed file mod 2^32 */
+ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
+#endif
+
+ ush bi_buf;
+ /* Output buffer. bits are inserted starting at the bottom (least
+ * significant bits).
+ */
+ int bi_valid;
+ /* Number of valid bits in bi_buf. All bits above the last valid bit
+ * are always zero.
+ */
+
+} FAR deflate_state;
+
+/* Output a byte on the stream.
+ * IN assertion: there is enough room in pending_buf.
+ */
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
+/* In order to simplify the code, particularly on 16 bit machines, match
+ * distances are limited to MAX_DIST instead of WSIZE.
+ */
+
+ /* in trees.c */
+void _tr_init OF((deflate_state *s));
+int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+void _tr_align OF((deflate_state *s));
+void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+
+#define d_code(dist) \
+ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
+/* Mapping from a distance to a distance code. dist is the distance - 1 and
+ * must not have side effects. _dist_code[256] and _dist_code[257] are never
+ * used.
+ */
+
+#ifndef DEBUG
+/* Inline versions of _tr_tally for speed: */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+ extern uch _length_code[];
+ extern uch _dist_code[];
+#else
+ extern const uch _length_code[];
+ extern const uch _dist_code[];
+#endif
+
+# define _tr_tally_lit(s, c, flush) \
+ { uch cc = (c); \
+ s->d_buf[s->last_lit] = 0; \
+ s->l_buf[s->last_lit++] = cc; \
+ s->dyn_ltree[cc].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+# define _tr_tally_dist(s, distance, length, flush) \
+ { uch len = (length); \
+ ush dist = (distance); \
+ s->d_buf[s->last_lit] = dist; \
+ s->l_buf[s->last_lit++] = len; \
+ dist--; \
+ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+ s->dyn_dtree[d_code(dist)].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+#else
+# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+# define _tr_tally_dist(s, distance, length, flush) \
+ flush = _tr_tally(s, distance, length)
+#endif
+
+#endif /* DEFLATE_H */
+
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/tcomp.c b/tinySIGCOMP/src/tcomp.c
new file mode 100644
index 0000000..22f5cb7
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp.c
@@ -0,0 +1,183 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp.c
+ * @brief SigComp (RFC 3320) Implementation for 2.5G and 3G cellular networks.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp.h"
+
+/** @mainpage tinySigComp API Overview
+*
+* This file is an overview of <b>tinySigComp</b> API.
+*
+* <b>tinySigComp</b> is a tiny but fully featured SigComp implementation for 2.5G, 3G and 4G cellular networks. This library is also used in Doubango project to provide SigComp
+* support for 3GPP IMS and OMA networks.
+* This API is designed to efficiently work on embedded systems whith limited memory and low computing power.
+*
+* As many operators have begun to commercially deploy IMS, the relevance of using SigComp to lower bandwidth usage will come quickly.
+* In my own opinion I think that most operators (especially those using RCS) will question how to reduce SIP signaling (registration, billing, presence, messaging …)
+* bandwidth usage (who will pay bits?).
+* These questions will especially concern using SIP (or all other text-based protocols) in wireless handsets as part of 2.5G, 3G and 4G cellular networks.
+*
+* SigComp stands for Signaling Compression and has been defined in <a href="http://www.ietf.org/rfc/rfc3320.txt">RFC 3320</a> by the Internet Engineering Task Force (IETF) ROHC working group.
+* <br> <br>
+*
+* @image html SigComp_Architecture.png "SigComp Architecture"
+*
+* Many application protocols used for multimedia communications are text-based and engineered for bandwidth rich links. As a result the messages have not been optimized in
+* terms of size. For example, typical IMS/SIP messages range from a few hundred bytes up to two thousand bytes or more. For this reason, SigComp is mandatory for
+* 3GPP IMS netwoks and <a href="http://en.wikipedia.org/wiki/Push_to_Talk_over_Cellular">PoC systems</a>.
+*
+* SigComp could also be useful for RCS (Rich Communication Suite) networks because of the size of the SIP packets (more than three thousand bytes for presence publication).
+* Using SigComp in IMS/RCS context will reduce the round-trip over slow radio links.
+*
+* @par Supported OS
+*
+* - Windows XX/Vista (Visual Studio 2005/2008 or Mingw32)
+* - Windows Mobile 5 and later (Visual Studio 2005/2008 or Mingw32ce/cegcc toolchain)
+* - Symbian S60 (Carbide.c++ v2.0 with S60_3rd_FP2_SDK_v1.1)
+* - Google Android
+* - Mac OS X, iPhone (Xcode)
+* - All Linux, FreeBSD, ... (GCC 4.x)
+*
+*
+* @par FEATURES
+*
+* The goal of this project is to provide a SigComp framework which:
+*
+* - Could be used as an external API or Framework
+* - Highly portable (Coded in ANSI-C without any external dependencies)
+* - Easily configurable (memory usage, priorities in static dictionaries, stateful/stateless modes, dynamic/static/shared compression types …)
+* - Easy to integrate with any existing SIP/IMS stack, Proxy-CSCF, PoC client …
+* - Allow to easily plug your own compressor (DEFLATE – RFC 1951- will be the default)
+* -
+* - Robust
+* - Efficiently run on mobile handsets (small footprint)
+* - Use small memory (UDVM decompression)
+* - Run fast without high CPU usage
+* - Supports both TCP and UDP compression modes
+* - Thread-safe
+*
+* @par COMPLIANCE
+*
+* - <a href="http://www.ietf.org/rfc/rfc3320.txt">RFC 3320</a>: Signaling Compression (SigComp)
+* - <a href="http://www.ietf.org/rfc/rfc3321.txt">RFC 3321</a>: Signaling Compression (SigComp) - Extended Operations
+* - <a href="http://www.ietf.org/rfc/rfc3485.txt">RFC 3485</a>: The Session Initiation Protocol (SIP) and Session Description Protocol (SDP) Static Dictionary for Signaling Compression (SigComp)
+* - <a href="http://www.ietf.org/rfc/rfc4077.txt">RFC 4077</a>: A Negative Acknowledgement Mechanism for Signaling Compression
+* - <a href="http://www.ietf.org/rfc/rfc4464.txt">RFC 4464</a>: Signaling Compression (SigComp) Users' Guide
+* - <a href="http://www.ietf.org/rfc/rfc4465.txt">RFC 4465</a>: Signaling Compression (SigComp) Torture Tests
+* - <a href="http://www.ietf.org/rfc/rfc4896.txt">RFC 4896</a>: Signaling Compression (SigComp) Corrections and Clarifications
+* - <a href="http://www.ietf.org/rfc/rfc5049.txt">RFC 5049</a>: Applying Signaling Compression (SigComp) to the Session Initiation Protocol (SIP)
+* - <a href="http://www.ietf.org/rfc/rfc5112.txt">RFC 5112</a>: The Presence-Specific Static Dictionary for Signaling Compression (Sigcomp)
+* - <a href="http://www.ietf.org/rfc/rfc1662.txt">RFC 1662</a>: PPP in HDLC-like Framing
+* - <a href="http://www.ietf.org/rfc/rfc1951.txt">RFC 1951</a>: DEFLATE Compressed Data Format Specification version
+* - <a href="http://www.ietf.org/rfc/rfc3174.txt">RFC 3174</a>: US Secure Hash Algorithm 1 (SHA1)
+* - 3GPP TR23.979 Annex C: Required SigComp performance
+*
+* @par Getting started
+*
+* - @ref tcomp_udp_compression_page
+* - @ref tcomp_udp_decompression_page
+*/
+
+/** @page tcomp_udp_compression_page SigComp UDP compression
+* It is easy to compress SIP a message and send it over UDP connection. The compression can be safely done in multithreaded appilaction because
+* <a href ="http://doubango.org/API/tinySigComp/">tinySigComp</a> is thread-safe.
+* You need <a href ="http://doubango.org/API/tinySAK/">tinySAK</a> in order to compile the code below.
+*
+* Include header files:
+* @code
+* #include "tsk_debug.h" // tinySAK debugging functions.
+* #include "tcomp_manager.h" // tinySigComp API functions.
+* @endcode
+*
+* Compartment Identifier: Used in SIP messages (sigomp-id) and tinySigComp to allocate/deallocate memory associated
+* to a compartment.
+* @code
+* #define COMPARTMENT_ID "urn:uuid:2e5fdc76-00be-4314-8202-1116fa82a475"
+* @endcode
+*
+* Preparation:
+* @code
+* #define MAX_BUFFER_SIZE 0xFFFF
+*
+* int i = 0;
+* tsk_size_t outLen = 0;
+* tcomp_result_t *result = 0;
+* char outputBuffer[MAX_BUFFER_SIZE];
+*
+* tcomp_manager_handle_t *manager = 0;
+
+* // Create SigComp manager
+* manager = TCOMP_MANAGER_CREATE();
+
+* // Add SIP/Presence dictionnaries (not mandatory)
+* tcomp_manager_addSipSdpDictionary(manager);
+* tcomp_manager_addPresenceDictionary(manager);
+
+* // Create result object and set compartment id --> It is recomanded to use one result object per manager.
+* result = TCOMP_RESULT_CREATE();
+* tcomp_result_setCompartmentId(result, COMPARTMENT_ID, strlen(COMPARTMENT_ID));
+
+* // Set user parameters (not mandatory)
+* tcomp_manager_setDecompression_Memory_Size(manager, 8192);
+* tcomp_manager_setCycles_Per_Bit(manager, 64);
+* tcomp_manager_setState_Memory_Size(manager, 8192);
+*
+* @endcode
+* Compress one or several messages using the code below:
+* @code
+* // Compress the SIP message
+* outLen = tcomp_manager_compress(manager,
+* COMPARTMENT_ID, strlen(COMPARTMENT_ID), // Compartment
+* "REGISTER ...", strlen("REGISTER ..."), // Sip message to compress and it's size
+* outputBuffer, sizeof(outputBuffer), // The ouptut buffer and it's size
+* FALSE // Indicates whether to compress as stream (SCTP, TCP...) message or not
+* );
+*
+* if(outLen){
+* // send SigComp message over UDP connection
+* sendto(sock, outputBuffer, outLen , 0, (SOCKADDR *)address, sizeof(address));
+* }
+* else{
+* // MUST never happen.
+* }
+* @endcode
+* To safely release all resources:
+* @code
+* // Close the compartment
+* tcomp_manager_closeCompartment(manager, COMPARTMENT_ID, strlen(COMPARTMENT_ID));
+* // Delete the result object
+* TSK_OBJECT_SAFE_FREE(result);
+* // Delete the manager
+* TSK_OBJECT_SAFE_FREE(manager);
+* @endcode
+*/
+
+
+/** @page tcomp_udp_decompression_page SigComp UDP decompression
+* Decompression is as easy as compression (thread-safe).
+*/ \ No newline at end of file
diff --git a/tinySIGCOMP/src/tcomp.h b/tinySIGCOMP/src/tcomp.h
new file mode 100644
index 0000000..58ef772
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp.h
@@ -0,0 +1,39 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp.h
+ * @brief SIGCOMP (RFC 3320) Implementation for 2.5G, 3G and 4G cellular networks.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSIGCOMPP_TCOMP_H_
+#define _TINYSIGCOMPP_TCOMP_H_
+
+#include "tinysigcomp_config.h"
+
+TCOMP_BEGIN_DECLS
+TCOMP_END_DECLS
+
+#endif /* _TINYSIGCOMPP_TCOMP_H_ */
diff --git a/tinySIGCOMP/src/tcomp_buffer.c b/tinySIGCOMP/src/tcomp_buffer.c
new file mode 100644
index 0000000..621ef8d
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_buffer.c
@@ -0,0 +1,665 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_buffer.c
+ * @brief SigComp Buffer.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_buffer.h"
+#include "tsk_binaryutils.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+#include <string.h>
+
+/** SigComp buffer.
+*/
+typedef struct tcomp_buffer_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tsk_size_t size; /**< The size of the buffer */
+ uint8_t* lpbuffer; /**< Pointer to the buffer */
+ tsk_size_t index_bytes; /**< Bytes (8bit size) cursor */
+ tsk_size_t index_bits; /**< Bits (1-bit size) cursor */
+ unsigned owner:1; /**< Indicates whether we are the owner of the buffer or not (external buffer) */
+ uint8_t P_BIT; /**< P-BIT controller. */
+}
+tcomp_buffer_t;
+
+
+tcomp_buffer_handle_t* tcomp_buffer_create(const void* data, tsk_size_t len)
+{
+ return tsk_object_new(tcomp_buffer_def_t, data, len);
+}
+
+tcomp_buffer_handle_t* tcomp_buffer_create_null()
+{
+ return tcomp_buffer_create(tsk_null, 0);
+}
+
+/**Compares two sigomp buffers.
+* @param handle1 First handle to compare.
+* @param handle2 Second handle to compare.
+* @retval @a tsk_true if the two handles are equals and @a tsk_false otherwise.
+*/
+tsk_bool_t tcomp_buffer_equals(const tcomp_buffer_handle_t* handle1, const tcomp_buffer_handle_t* handle2)
+{
+ if( tcomp_buffer_getSize(handle1) == tcomp_buffer_getSize(handle2) ){
+ return tcomp_buffer_startsWith(handle1, handle2);
+ }
+
+ return tsk_false;
+}
+
+
+/**Checks if the first internal buffer starts with the second handle internal buffer.
+* @param handle1 First handle
+* @param handle2 Second handle
+* @retval Returns @a tsk_true if the first internal buffer starts with the second handle internal buffer and @a tsk_false otherwise.
+*/
+tsk_bool_t tcomp_buffer_startsWith(const tcomp_buffer_handle_t* handle1, const tcomp_buffer_handle_t* handle2) /*const*/
+{
+ tsk_size_t i;
+ tcomp_buffer_t* buffer1 = (tcomp_buffer_t*)handle1;
+ tcomp_buffer_t* buffer2 = (tcomp_buffer_t*)handle2;
+
+ if(buffer1->size < buffer2->size){
+ return tsk_false;
+ }
+
+ for(i = 0; i< buffer2->size; i++){
+ if(buffer1->lpbuffer[i] != buffer2->lpbuffer[i]){
+ return tsk_false;
+ }
+ }
+ return tsk_true;
+}
+
+/**Gets a readonly pointer to the internal buffer.
+* @param handle The handle for which to get the internal buffer.
+* @param position Position pointer
+* @retval Pointer to the internal buffer.
+*/
+const uint8_t* tcomp_buffer_getReadOnlyBufferAtPos(const tcomp_buffer_handle_t* handle, tsk_size_t position)/*const*/
+{
+ if(handle){
+ return (((tcomp_buffer_t*)handle)->lpbuffer + position);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_null;
+}
+
+/**Gets a read/write pointer to the internal buffer.
+* @param handle The handle for which to get the internal buffer.
+* @param position Position pointer
+* @retval Pointer to the internal buffer.
+*/
+uint8_t* tcomp_buffer_getBufferAtPos(const tcomp_buffer_handle_t* handle, tsk_size_t position)
+{
+ if(handle){
+ return (((tcomp_buffer_t*)handle)->lpbuffer + position);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_null;
+}
+
+
+/** Gets the internal buffer size
+* @retval The size of the internal buffer
+*/
+tsk_size_t tcomp_buffer_getSize(const tcomp_buffer_handle_t* handle) /*const*/
+{
+ if(handle){
+ return ((tcomp_buffer_t*)handle)->size;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return 0;
+}
+
+/**Gets the remainning bits.
+* @param handle The handle for which to get the remaining bits.
+*/
+tsk_size_t tcomp_buffer_getRemainingBits(const tcomp_buffer_handle_t* handle) /*const*/
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ tsk_size_t result = ((buffer->size * 8) - ((buffer->index_bytes * 8) + buffer->index_bits));
+ return (result < 0) ? 0: result;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return 0;
+}
+
+/**Reads @a size bytes.
+* @param handle The handle for which to read bytes.
+* @param length Number of bytes to read.
+* @retval Pointer to the resulting buffer.
+*/
+uint8_t* tcomp_buffer_readBytes(tcomp_buffer_handle_t* handle, tsk_size_t length)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ tsk_size_t old_index;
+
+ if((buffer->index_bytes + length) > (buffer->size)) {
+ return tsk_null;
+ }
+
+ old_index = buffer->index_bytes;
+ buffer->index_bytes += length;
+
+ return tcomp_buffer_getBufferAtPos(handle, old_index);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_null;
+}
+
+/**Reads the internal buffer from LSB to MSB as per RFC 3320 subclause 8.2.
+* @param handle The SigComp handle holding the internal buffer to read.
+* @param length The length of the buffer to read.
+* @retval All bits as a 2-bytes integer value
+*/
+uint16_t tcomp_buffer_readLsbToMsb(tcomp_buffer_handle_t* handle, tsk_size_t length)
+{
+ // UDV Memory is always MSB first
+ // MSB <-- LSB
+ // FIXME: use mask
+ if(handle)
+ {
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ uint8_t pos = 0;
+ char* end;
+ uint16_t result_val = 0;
+ char result_str[16]; memset(result_str, 0, 16);
+ while(pos < length){
+ result_str[pos++] = (buffer->lpbuffer[buffer->index_bytes]
+ &(1 << (buffer->index_bits))) ? '1' : '0';
+ if(++buffer->index_bits == 8){
+ buffer->index_bytes++;
+ buffer->index_bits = 0;
+ }
+ }
+
+ end = (result_str+length);
+ result_val = (uint16_t)strtol(result_str, &end, 2);
+
+ return result_val;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return 0;
+}
+
+/**Reads the internal buffer from MSB to LSB as per RFC 3320 subclause 8.2.
+* @param handle The SigComp handle holding the internal buffer to read.
+* @param length The length of the buffer to read.
+* @retval All bits as a 2-bytes integer value
+*/
+uint16_t tcomp_buffer_readMsbToLsb(tcomp_buffer_handle_t* handle, tsk_size_t length)
+{
+ // UDV Memory is always MSB first
+ // MSB --> LSB
+ // FIXME: use mask
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ uint8_t pos = 0;
+ char* end;
+ uint16_t result_val = 0;
+ char result_str[16]; memset(result_str, 0, 16);
+
+ while(pos < length){
+ result_str[pos++] = (buffer->lpbuffer[buffer->index_bytes]
+ &(128 >> (buffer->index_bits))) ? '1' : '0';
+ if(++buffer->index_bits == 8){
+ buffer->index_bytes++;
+ buffer->index_bits = 0;
+ }
+ }
+
+ end = (result_str + length);
+ result_val = (uint16_t)strtol(result_str, &end, 2);
+
+ return result_val;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return 0;
+}
+
+/**Discards bits as per RFC 3320 subclause 8.2.
+* @param handle SigComp handle holding the internal buffer.
+*/
+void tcomp_buffer_discardBits(tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ if(buffer->index_bits){
+ buffer->index_bits=0;
+ buffer->index_bytes++;
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+/**Discards last bytes as per RFC 3320 subclause 8.2.
+* @param handle SigComp handle holding the internal buffer.
+* @param count The number of bytes to discard.
+*/
+void tcomp_buffer_discardLastBytes(tcomp_buffer_handle_t* handle, uint16_t count)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ if(buffer->size > count){
+ buffer->size -= count;
+ }
+ else{
+ tcomp_buffer_freeBuff(handle);
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+/**Allocs the internal buffer.
+* @param handle SigComp handle holding the internal buffer to alloc.
+* @param size Number of bytes to allocate.
+*/
+void tcomp_buffer_allocBuff(tcomp_buffer_handle_t* handle, tsk_size_t size)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ if(!buffer->owner){
+ TSK_DEBUG_ERROR("The SigComp is not the owner of the internal buffer to alloc.");
+ return;
+ }
+ if(!size){
+ TSK_DEBUG_WARN("Cannot allocate zero bytes.");
+ return;
+ }
+ tsk_free((void**)&(buffer->lpbuffer));
+
+ buffer->index_bits = buffer->index_bytes = 0;
+ buffer->lpbuffer = (uint8_t*) tsk_calloc(1, size );
+ buffer->size = size;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+/**Adds a buffer as a reference (not owned).
+* @param handle SigComp handle holding the internal buffer.
+* @param externalBuff THe external buffer to reference.
+* @param size The size of the external buffer.
+*/
+void tcomp_buffer_referenceBuff(tcomp_buffer_handle_t* handle, uint8_t* externalBuff, tsk_size_t size)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ if(buffer->size && buffer->owner){
+ TSK_DEBUG_ERROR("The SigComp handle already hold an internal buffer.");
+ return;
+ }
+
+ buffer->size = size;
+ buffer->lpbuffer = externalBuff;
+ buffer->index_bytes = 0;
+ buffer->index_bits = 0;
+ buffer->owner = 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+/**Appends data to our internal buffer.
+* @param handle The handle to the SigComp buffer.
+* @param data Data to append to our internal buffer.
+* @param size The size of the data
+* @retval @a tsk_true if succeed an @a tsk_false otherwise.
+*/
+tsk_bool_t tcomp_buffer_appendBuff(tcomp_buffer_handle_t* handle, const void* data, tsk_size_t size)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ tsk_size_t oldSize = buffer->size;
+ tsk_size_t newSize = (oldSize + size);
+ {
+ // realloc buffer
+ if(!buffer->size){
+ buffer->lpbuffer = (uint8_t*)tsk_calloc(1, newSize);
+ }
+ else{
+ buffer->lpbuffer = (uint8_t*)tsk_realloc(buffer->lpbuffer, newSize);
+ }
+ }
+
+ if(!buffer->lpbuffer){
+ return tsk_false;
+ }
+
+ if(data){
+ memcpy((buffer->lpbuffer+oldSize), data, size);
+ }
+ else{
+ memset((buffer->lpbuffer+oldSize), 0, size);
+ }
+
+ buffer->size = newSize;
+ return tsk_true;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_false;
+}
+
+/**Removes @a size bytes from the internal buffer.
+* @param handle SigComp handle holding the internal buffer from which to remove bytes.
+* @param pos The starting position from which to start removing bytes
+* @param size The number of bytes to remove
+* @retval @a tsk_true if succeed an @a tsk_false otherwise.
+*/
+tsk_bool_t tcomp_buffer_removeBuff(tcomp_buffer_handle_t* handle, tsk_size_t pos, tsk_size_t size)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ tsk_size_t oldSize, newSize;
+
+ if(((pos + size) > buffer->size)) size = (buffer->size - pos);
+ memcpy((buffer->lpbuffer + pos), (buffer->lpbuffer + pos + size), (buffer->size - (pos + size)));
+
+ oldSize = buffer->size;
+ newSize = (oldSize - size);
+ {
+ if(!(buffer->size)){
+ buffer->lpbuffer = (uint8_t*)tsk_calloc(1, newSize);
+ }
+ else{
+ buffer->lpbuffer = (uint8_t*)tsk_realloc(buffer->lpbuffer, newSize);
+ }
+ }
+ if(buffer->lpbuffer){
+ buffer->size = newSize;
+ return tsk_true;
+ }
+ return tsk_false;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_false;
+}
+
+/**Free the internal buffer.
+* @param handle SigComp handle holding the internal buffer to free.
+*/
+void tcomp_buffer_freeBuff(tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ if(buffer->lpbuffer && buffer->size && buffer->owner) {
+ tsk_free((void**)&(buffer->lpbuffer));
+ }
+ buffer->size = buffer->index_bytes = buffer->index_bits = 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+/**Gets the bytes cursor position.
+* @param handle SigComp handle holding the internal buffer.
+* @retval The cursor position.
+*/
+tsk_size_t* tcomp_buffer_getIndexBytes(const tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ return &(((tcomp_buffer_t*)handle)->index_bytes);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return 0;
+}
+
+/**Gets the bits cursor position.
+* @param handle SigComp handle holding the internal buffer.
+* @retval The cursor position.
+*/
+tsk_size_t* tcomp_buffer_getIndexBits(const tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ return &(((tcomp_buffer_t*)handle)->index_bits);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_null;
+}
+
+/**Gets the P-bit controller value.
+* The P-bit controls the order in which bits are passed from the dispatcher to the INPUT instructions. If set to 0, it indicates that
+* the bits within an individual byte are passed to the INPUT instructions in MSB to LSB order. If it is set to 1, the bits are
+* passed in LSB to MSB order.
+* @param handle SigComp handle holding the internal buffer.
+* @retval The P-Bit value.
+*/
+uint8_t* tcomp_buffer_getP_BIT(const tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ return &(((tcomp_buffer_t*)handle)->P_BIT);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+
+ return tsk_null;
+}
+
+/**Creates a random HASH number.
+*/
+uint64_t tcomp_buffer_createHash(const void *data, tsk_size_t len)
+{
+ if(!data || !len){
+ TSK_DEBUG_ERROR("Null data.");
+ return 0;
+ }
+ {
+#define PRIME_1 500237
+#define PRIME_2 700241
+ uint64_t hash = 0;
+ uint8_t* strid = (uint8_t*)data;
+
+ /* Generate Hash code from id */
+ {
+ uint64_t b = PRIME_1, a = PRIME_2;
+ tsk_size_t i;
+ for(i = 0; i < len; strid++, i++)
+ {
+ hash = hash * a + (*strid);
+ a = a * b;
+ }
+ }
+ return hash;
+
+#undef PRIME_1
+#undef PRIME_2
+ }
+}
+
+/**Prints the internal buffer.
+* @param handle SigComp handle holding the internal buffer to print.
+* @param size The number of bytes to print.
+*/
+void tcomp_buffer_nprint(tcomp_buffer_handle_t* handle, tsk_size_t size)
+{
+#if defined(_DEBUG) || defined(DEBUG)
+
+ if(handle){
+ tsk_size_t i, tsk_size_to_print;
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+ tsk_size_to_print = (size<0) ? buffer->size : size;
+
+ if( !tsk_size_to_print || !buffer->lpbuffer) return;
+
+ for(i = 0; i < tsk_size_to_print; i+=2){
+ char s[10];
+ uint16_t value;
+ memset(s, 0, 10);
+
+ if((i+1) == tsk_size_to_print){
+ // last 2-byte lay in 1byte
+ value = buffer->lpbuffer[i];
+#if 0
+ sprintf_s(s, 10, i?"%0.2x":"0x%0.2x", value);
+#else
+ sprintf(s, i ? "%0.2x" : "0x%0.2x", value);
+#endif
+ }
+ else{
+ uint8_t *b_ptr = tcomp_buffer_getBufferAtPos(handle, i);
+ value = TSK_BINARY_GET_2BYTES(b_ptr);
+#if 0
+ sprintf_s(s, 10, i?"%0.4x":"0x%0.4x", value);
+#else
+ sprintf(s, i?"%0.4x":"0x%0.4x", value);
+#endif
+ }
+ printf("%s ", s);
+ }
+ printf("\n\n");
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+#endif
+}
+
+/**Resets a sigcomp buffer.
+* @param handle Handle holding the internal buffer to reset.
+*/
+void tcomp_buffer_reset(tcomp_buffer_handle_t* handle)
+{
+ if(handle){
+ tcomp_buffer_t* buffer = (tcomp_buffer_t*)handle;
+
+ buffer->index_bytes = 0;
+ buffer->index_bits = 0;
+ if(buffer->lpbuffer){
+ memset(buffer->lpbuffer, 0, buffer->size);
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle");
+ }
+}
+
+
+
+
+
+
+
+
+
+
+//========================================================
+// SigComp buffer object definition
+//
+static tsk_object_t* tcomp_buffer_ctor(tsk_object_t *self, va_list * app)
+{
+ tcomp_buffer_t* buffer = self;
+ const void* data = va_arg(*app, const void *);
+ tsk_size_t len = va_arg(*app, tsk_size_t);
+
+ if(buffer){
+ buffer->owner = 1;
+
+ /*
+ * The P-bit controls the order in which bits are passed from the dispatcher to the INPUT instructions.
+ */
+ buffer->P_BIT = TCOMP_P_BIT_MSB_TO_LSB;
+
+ if(data && len){
+ tcomp_buffer_appendBuff(buffer, data, len);
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Cannot create new SigComp handle");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_buffer_dtor(tsk_object_t *self)
+{
+ tcomp_buffer_t* buffer = self;
+ if(buffer){
+ tcomp_buffer_freeBuff(buffer);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp handle.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_buffer_def_s =
+{
+ sizeof(tcomp_buffer_t),
+ tcomp_buffer_ctor,
+ tcomp_buffer_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_buffer_def_t = &tcomp_buffer_def_s;
+
diff --git a/tinySIGCOMP/src/tcomp_buffer.h b/tinySIGCOMP/src/tcomp_buffer.h
new file mode 100644
index 0000000..6393f7d
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_buffer.h
@@ -0,0 +1,90 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_buffer.h
+ * @brief SigComp Buffer
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_BUFFER_H
+#define TCOMP_BUFFER_H
+
+#include "tinysigcomp_config.h"
+
+#include "tsk_object.h"
+
+
+TCOMP_BEGIN_DECLS
+
+#define TCOMP_P_BIT_MSB_TO_LSB 0
+#define TCOMP_P_BIT_LSB_TO_MSB 1
+
+/**Sigcomp Buffer handle
+*/
+typedef void tcomp_buffer_handle_t;
+
+tcomp_buffer_handle_t* tcomp_buffer_create(const void* data, tsk_size_t len);
+tcomp_buffer_handle_t* tcomp_buffer_create_null();
+
+tsk_bool_t tcomp_buffer_equals(const tcomp_buffer_handle_t* handle1, const tcomp_buffer_handle_t* handle2);
+tsk_bool_t tcomp_buffer_startsWith(const tcomp_buffer_handle_t* handle1, const tcomp_buffer_handle_t* handle2) /*const*/;
+
+const uint8_t* tcomp_buffer_getReadOnlyBufferAtPos(const tcomp_buffer_handle_t* handle, tsk_size_t position) /*const*/;
+#define tcomp_buffer_getReadOnlyBuffer(buffer) tcomp_buffer_getReadOnlyBufferAtPos(buffer, 0)
+
+TINYSIGCOMP_API uint8_t* tcomp_buffer_getBufferAtPos(const tcomp_buffer_handle_t* handle, tsk_size_t position);
+#define tcomp_buffer_getBuffer(handle) tcomp_buffer_getBufferAtPos(handle, 0)
+
+TINYSIGCOMP_API tsk_size_t tcomp_buffer_getSize(const tcomp_buffer_handle_t* handle) /*const*/;
+tsk_size_t tcomp_buffer_getRemainingBits(const tcomp_buffer_handle_t* handle) /*const*/;
+
+uint8_t* tcomp_buffer_readBytes(tcomp_buffer_handle_t* handle, tsk_size_t size);
+uint16_t tcomp_buffer_readLsbToMsb(tcomp_buffer_handle_t* handle, tsk_size_t length);
+uint16_t tcomp_buffer_readMsbToLsb(tcomp_buffer_handle_t* handle, tsk_size_t length);
+void tcomp_buffer_discardBits(tcomp_buffer_handle_t* handle);
+void tcomp_buffer_discardLastBytes(tcomp_buffer_handle_t* handle, uint16_t count);
+
+void tcomp_buffer_allocBuff(tcomp_buffer_handle_t* handle, tsk_size_t size);
+void tcomp_buffer_referenceBuff(tcomp_buffer_handle_t* handle, uint8_t* externalBuff, tsk_size_t size);
+tsk_bool_t tcomp_buffer_appendBuff(tcomp_buffer_handle_t* handle, const void* data, tsk_size_t size);
+tsk_bool_t tcomp_buffer_removeBuff(tcomp_buffer_handle_t* handle, tsk_size_t pos, tsk_size_t size);
+void tcomp_buffer_freeBuff(tcomp_buffer_handle_t* handle);
+
+tsk_size_t* tcomp_buffer_getIndexBytes(const tcomp_buffer_handle_t* handle);
+tsk_size_t* tcomp_buffer_getIndexBits(const tcomp_buffer_handle_t* handle);
+
+uint8_t* tcomp_buffer_getP_BIT(const tcomp_buffer_handle_t* handle);
+
+uint64_t tcomp_buffer_createHash(const void *data, tsk_size_t len);
+
+void tcomp_buffer_nprint(tcomp_buffer_handle_t* handle, tsk_size_t size);
+#define tcomp_buffer_print(handle) tcomp_buffer_nprint(handle, -1)
+
+void tcomp_buffer_reset(tcomp_buffer_handle_t* handle);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_buffer_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_BUFFER_H */
diff --git a/tinySIGCOMP/src/tcomp_compartment.c b/tinySIGCOMP/src/tcomp_compartment.c
new file mode 100644
index 0000000..75beb93
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compartment.c
@@ -0,0 +1,531 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compartment.c
+ * @brief SigComp compartment.
+ * An application-specific grouping of messages that relate to a peer endpoint. Depending on the signaling protocol, this grouping may
+ * relate to application concepts such as "session", "dialog", "connection", or "association". The application allocates state
+ * memory on a per-compartment basis, and determines when a compartment should be created or closed.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_compartment.h"
+
+#include "tsk_debug.h"
+
+#include <assert.h>
+
+tcomp_compartment_t* tcomp_compartment_create(uint64_t id, uint16_t sigCompParameters)
+{
+ return tsk_object_new(tcomp_compartment_def_t, id, sigCompParameters);
+}
+
+/**Sets remote parameters
+*/
+void tcomp_compartment_setRemoteParams(tcomp_compartment_t *compartment, tcomp_params_t *lpParams)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ /* CPB||DMS||SMS [1-BYTE] */
+ if(tcomp_params_hasCpbDmsSms(lpParams)){
+ tcomp_params_setCpbCode(compartment->remote_parameters, lpParams->cpbCode);
+ tcomp_params_setDmsCode(compartment->remote_parameters, lpParams->dmsCode);
+ tcomp_params_setSmsCode(compartment->remote_parameters, lpParams->smsCode);
+ }
+
+ /* SigComp version */
+ if(lpParams->SigComp_version){
+ compartment->remote_parameters->SigComp_version = lpParams->SigComp_version;
+ }
+
+ /*
+ * Returned states
+ * FIXME: check states about quota
+ * FIXME: not tic tac
+ * FIXME: what about returned feedback?
+ */
+ if(lpParams->returnedStates && tcomp_buffer_getSize(lpParams->returnedStates)){
+ TSK_OBJECT_SAFE_FREE(compartment->remote_parameters->returnedStates);
+ /* swap */
+ compartment->remote_parameters->returnedStates = lpParams->returnedStates;
+ lpParams->returnedStates = 0;
+ }
+}
+
+/**Sets requested feedback
+*/
+void tcomp_compartment_setReqFeedback(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ /* Delete old */
+ TSK_OBJECT_SAFE_FREE(compartment->lpReqFeedback);
+
+ compartment->lpReqFeedback = tcomp_buffer_create(tcomp_buffer_getBuffer(feedback), tcomp_buffer_getSize(feedback));
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Sets returned feedback
+*/
+void tcomp_compartment_setRetFeedback(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ // Delete old
+ TSK_OBJECT_SAFE_FREE(compartment->lpRetFeedback);
+
+ compartment->lpRetFeedback = tcomp_buffer_create(tcomp_buffer_getBuffer(feedback), tcomp_buffer_getSize(feedback));
+
+#if USE_ONLY_ACKED_STATES
+ /*
+ * ACK STATE ==> Returned feedback contains the partial state-id.
+ */
+ if(compartment->compressorData && !compartment->compressorData_isStream){
+ tcomp_buffer_handle_t *stateid = tcomp_buffer_create(tcomp_buffer_getBufferAtPos(feedback, 1), tcomp_buffer_getSize(feedback)-1);
+ compartment->ackGhost(compartment->compressorData, stateid);
+ TSK_OBJECT_SAFE_FREE(stateid);
+ }
+#endif
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Clears are compartment from the history.
+*/
+void tcomp_compartment_clearStates(tcomp_compartment_t *compartment)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("NULL sigcomp compartment.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ tsk_list_clear_items(compartment->local_states);
+ compartment->total_memory_left = compartment->total_memory_size;
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Removes a state from the compartment by priority.
+*/
+void tcomp_compartment_freeStateByPriority(tcomp_compartment_t *compartment)
+{
+ tcomp_state_t *lpState;
+ tsk_list_item_t *item;
+
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ lpState = 0;
+ item = 0;
+
+ /*
+ * The order in which the existing state items are freed is determined by the state_retention_priority, which is set when the
+ * state items are created. The state_retention_priority of 65535 is reserved for locally available states; these states must always be
+ * freed first. Apart from this special case, states with the lowest state_retention_priority are always freed first. In the event of
+ * a tie, then the state item created first in the compartment is also the first to be freed.
+ */
+ tsk_list_foreach(item, compartment->local_states){
+ tcomp_state_t *curr = item->data;
+
+ if(!curr){
+ continue;
+ }
+
+ /* First --> always ok */
+ if(item == compartment->local_states->head){
+ lpState = curr;
+ continue;
+ }
+
+ /* Local state ? */
+ if(curr->retention_priority == 65535){
+ lpState = curr;
+ break;
+ }
+
+ /* Lower priority? */
+ if(curr->retention_priority < lpState->retention_priority){
+ lpState = curr;
+ continue;
+ }
+ }
+
+ if(lpState){
+ compartment->total_memory_left += TCOMP_GET_STATE_SIZE(lpState);
+ tsk_list_remove_item_by_data(compartment->local_states, lpState);
+ }
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Removes a state from the compartment.
+*/
+void tcomp_compartment_freeState(tcomp_compartment_t *compartment, tcomp_state_t **lpState)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ compartment->total_memory_left += TCOMP_GET_STATE_SIZE(*lpState);
+ tsk_list_remove_item_by_data(compartment->local_states, *lpState);
+ *lpState = 0;
+ TSK_DEBUG_INFO("SigComp - Free state.");
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Remove states
+*/
+void tcomp_compartment_freeStates(tcomp_compartment_t *compartment, tcomp_tempstate_to_free_t **tempStates, uint8_t size)
+{
+ uint8_t i;
+ tcomp_state_t *lpState;
+ tsk_list_item_t *item;
+
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ if(!tempStates || !size){
+ return;
+ }
+
+ lpState = tsk_null;
+ item = tsk_null;
+
+ for (i = 0; i < size; i++){
+ /* lock */
+ tsk_safeobj_lock(compartment);
+
+ tsk_list_foreach(item, compartment->local_states){
+ tcomp_state_t *curr = item->data;
+
+ /* Compare current state with provided partial state */
+ if(tcomp_buffer_startsWith(curr->identifier, tempStates[i]->identifier)){
+ /*
+ * If more than one state item in the compartment matches the partial state identifier,
+ * then the state free request is ignored.
+ */
+ if(lpState){
+ lpState = 0;
+ break;
+ }
+ else{
+ lpState = curr;
+ }
+ }
+ }
+
+ /* unlock */
+ tsk_safeobj_unlock(compartment);
+
+ if(lpState){
+ tcomp_compartment_freeState(compartment, &lpState);
+ }
+ }
+}
+
+/**Adds a state to the compartment.
+*/
+void tcomp_compartment_addState(tcomp_compartment_t *compartment, tcomp_state_t **lpState)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ tcomp_state_makeValid(*lpState);
+ compartment->total_memory_left -= TCOMP_GET_STATE_SIZE(*lpState);
+ tsk_list_push_back_data(compartment->local_states, ((void**) lpState));
+
+ TSK_DEBUG_INFO("SigComp - Add new state.");
+ *lpState = tsk_null;
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Finds a state.
+*/
+uint16_t tcomp_compartment_findState(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState)
+{
+ uint16_t count = 0;
+ tsk_list_item_t *item;
+
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ item = tsk_null;
+
+ tsk_list_foreach(item, compartment->local_states){
+ tcomp_state_t *curr = item->data;
+
+ if(tcomp_buffer_startsWith(curr->identifier, partial_identifier)){
+ *lpState = curr; // override
+ count++;
+ }
+ }
+
+ tsk_safeobj_unlock(compartment);
+
+ return count;
+}
+
+/**Removes a Ghost state.
+*/
+void tcomp_compartment_freeGhostState(tcomp_compartment_t *compartment)
+{
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ if(compartment->compressorData){
+ compartment->freeGhostState(compartment->compressorData);
+ }
+ else{
+ TSK_DEBUG_WARN("No compression data to free.");
+ }
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Adds a NACK to the compartment.
+*/
+void tcomp_compartment_addNack(tcomp_compartment_t *compartment, const uint8_t nackId[TSK_SHA1_DIGEST_SIZE])
+{
+ tcomp_buffer_handle_t *id;
+
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ // FIXME: very bad
+ if(compartment->nacks_history_count >= NACK_MAX_HISTORY_SIZE){
+ //tsk_list_item_t *item;
+ tsk_list_item_t *item2delete = 0;
+
+ /*tsk_list_foreach(item, compartment->nacks)
+ {
+ item2delete = item;
+ }*/
+
+ item2delete = compartment->nacks->tail;
+
+ tsk_list_remove_item(compartment->nacks, item2delete);
+ compartment->nacks_history_count--;
+ }
+
+
+ id = tcomp_buffer_create(nackId, TSK_SHA1_DIGEST_SIZE);
+ tsk_list_push_back_data(compartment->nacks, ((void**) &id));
+ compartment->nacks_history_count++;
+
+ tsk_safeobj_unlock(compartment);
+}
+
+/**Checks if the NACK exist.
+*/
+tsk_bool_t tcomp_compartment_hasNack(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *nackId)
+{
+ tsk_bool_t ret = tsk_false;
+ tsk_list_item_t *item;
+
+ if(!compartment){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return tsk_false;
+ }
+
+ tsk_safeobj_lock(compartment);
+
+ item = tsk_null;
+
+ tsk_list_foreach(item, compartment->nacks){
+ tcomp_buffer_handle_t *curr = item->data;
+
+ if(tcomp_buffer_equals(curr, nackId)){
+ TSK_DEBUG_INFO("SigComp - Nack found.");
+ ret = tsk_true;
+ break;
+ }
+ }
+
+ tsk_safeobj_unlock(compartment);
+
+ return ret;
+}
+
+
+
+
+
+
+
+
+
+
+//========================================================
+// State object definition
+//
+
+static tsk_object_t* tcomp_compartment_ctor(tsk_object_t* self, va_list * app)
+{
+ tcomp_compartment_t *compartment = self;
+ if(compartment){
+ uint64_t id = va_arg(*app, uint64_t);
+#if defined (__GNUC__)
+ uint16_t sigCompParameters = (uint16_t)va_arg(*app, unsigned);
+#else
+ uint16_t sigCompParameters = va_arg(*app, uint16_t);
+#endif
+
+ /* Initialize safeobject */
+ tsk_safeobj_init(compartment);
+
+ /*
+ +---+---+---+---+---+---+---+---+
+ | cpb | dms | sms |
+ +---+---+---+---+---+---+---+---+
+ | SigComp_version |
+ +---+---+---+---+---+---+---+---+
+ */
+
+ // I always assume that remote params are equal to local params
+
+ /* Identifier */
+ compartment->identifier = id;
+
+ /* Remote parameters */
+ compartment->remote_parameters = tcomp_params_create();
+ tcomp_params_setParameters(compartment->remote_parameters, sigCompParameters);
+
+ /* Local parameters */
+ compartment->local_parameters = tcomp_params_create();
+ tcomp_params_setParameters(compartment->local_parameters, sigCompParameters);
+
+ /* Total size */
+ compartment->total_memory_size = compartment->total_memory_left = compartment->local_parameters->smsValue;
+
+ /* Empty list. */
+ compartment->nacks = tsk_list_create();
+
+ /* Empty list. */
+ compartment->local_states = tsk_list_create();
+ }
+ else{
+ TSK_DEBUG_ERROR("Null Compartment");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_compartment_dtor(tsk_object_t* self)
+{
+ tcomp_compartment_t *compartment = self;
+ if(compartment){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(compartment);
+
+ /* Delete all states */
+ TSK_OBJECT_SAFE_FREE(compartment->local_states);
+
+ /* Delete feedbacks */
+ TSK_OBJECT_SAFE_FREE(compartment->lpReqFeedback);
+ TSK_OBJECT_SAFE_FREE(compartment->lpRetFeedback);
+
+ /* Delete Nacks */
+ TSK_OBJECT_SAFE_FREE(compartment->nacks);
+
+ /* Delete Compressor data */
+ TSK_OBJECT_SAFE_FREE(compartment->compressorData);
+ compartment->ackGhost = 0;
+ compartment->freeGhostState = 0;
+
+ /* Delete params */
+ TSK_OBJECT_SAFE_FREE(compartment->local_parameters);
+ TSK_OBJECT_SAFE_FREE(compartment->remote_parameters);
+
+ /* Delete NACKS */
+ TSK_OBJECT_SAFE_FREE(compartment->nacks);
+
+ /* Delete local states */
+ TSK_OBJECT_SAFE_FREE(compartment->local_states);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null Compartment");
+ }
+
+ return self;
+}
+
+static int tcomp_compartment_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
+{
+ const tcomp_compartment_t *compartment1 = obj1;
+ const tcomp_compartment_t *compartment2 = obj2;
+ uint64_t res = (compartment1->identifier - compartment2->identifier);
+ return res > 0 ? (int)1 : (res < 0 ? (int)-1 : (int)0);
+}
+
+static const tsk_object_def_t tsk_compartment_def_s =
+{
+ sizeof(tcomp_compartment_t),
+ tcomp_compartment_ctor,
+ tcomp_compartment_dtor,
+ tcomp_compartment_cmp
+};
+const tsk_object_def_t *tcomp_compartment_def_t = &tsk_compartment_def_s;
diff --git a/tinySIGCOMP/src/tcomp_compartment.h b/tinySIGCOMP/src/tcomp_compartment.h
new file mode 100644
index 0000000..0a50f6d
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compartment.h
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compartment.h
+ * @brief SIGCOMP compartment.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPARTMENT_H
+#define TCOMP_COMPARTMENT_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_types.h"
+#include "tcomp_params.h"
+#include "tcomp_compressordata.h"
+#include "tcomp_result.h"
+
+#include "tsk_safeobj.h"
+#include "tsk_object.h"
+#include "tsk_sha1.h"
+
+TCOMP_BEGIN_DECLS
+
+typedef struct tcomp_compartment_s
+{
+ TSK_DECLARE_OBJECT;
+
+ /*
+ * An identifier (in a locally chosen format) that uniquely references a compartment.
+ */
+ uint64_t identifier;
+
+ tcomp_states_L_t *local_states;
+ tcomp_params_t *remote_parameters;
+ tcomp_params_t *local_parameters;
+ uint16_t total_memory_size;
+ uint16_t total_memory_left;
+
+ tcomp_buffer_handle_t *lpReqFeedback;
+ tcomp_buffer_handle_t *lpRetFeedback;
+
+ TCOMP_DECLARE_COMPRESSORDATA;
+
+ tcomp_buffers_L_t* nacks;
+ uint8_t nacks_history_count;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_compartment_t;
+
+tcomp_compartment_t* tcomp_compartment_create(uint64_t id, uint16_t sigCompParameters);
+
+//
+// SigComp Parameters
+//
+void tcomp_compartment_setRemoteParams(tcomp_compartment_t *compartment, tcomp_params_t *lpParams);
+//
+// Feedbacks
+//
+void tcomp_compartment_setReqFeedback(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback);
+void tcomp_compartment_setRetFeedback(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback);
+
+void tcomp_compartment_clearStates(tcomp_compartment_t *compartment);
+void tcomp_compartment_freeStateByPriority(tcomp_compartment_t *compartment);
+void tcomp_compartment_freeState(tcomp_compartment_t *compartment, tcomp_state_t **lpState);
+void tcomp_compartment_freeStates(tcomp_compartment_t *compartment, tcomp_tempstate_to_free_t **tempStates, uint8_t size);
+void tcomp_compartment_addState(tcomp_compartment_t *compartment, tcomp_state_t **lpState);
+uint16_t tcomp_compartment_findState(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState);
+void tcomp_compartment_freeGhostState(tcomp_compartment_t *compartment);
+
+
+//
+// Nacks
+//
+void tcomp_compartment_addNack(tcomp_compartment_t *compartment, const uint8_t nackId[TSK_SHA1_DIGEST_SIZE]);
+tsk_bool_t tcomp_compartment_hasNack(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *nackId);
+
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_compartment_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPARTMENT_H */
diff --git a/tinySIGCOMP/src/tcomp_compressor.h b/tinySIGCOMP/src/tcomp_compressor.h
new file mode 100644
index 0000000..6ea2bf9
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressor.h
@@ -0,0 +1,51 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief Compression function definition.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSOR_H
+#define TCOMP_COMPRESSOR_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_compartment.h"
+
+TCOMP_BEGIN_DECLS
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @typedef int (*tcomp_compressor_compress_f)(tcomp_compartment_t *lpCompartment,
+/// const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size,
+/// int stream)
+///
+/// @brief Function pointer definition for compression method.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+typedef tsk_bool_t (*tcomp_compressor_compress_f)(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream);
+
+#define TCOMP_COMPRESSOR_COMPRESS_F(self) ((tcomp_compressor_compress_f)(self))
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSOR_H */
diff --git a/tinySIGCOMP/src/tcomp_compressor_deflate.c b/tinySIGCOMP/src/tcomp_compressor_deflate.c
new file mode 100644
index 0000000..ee58b32
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressor_deflate.c
@@ -0,0 +1,218 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief SigComp Deflate compressor.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_compressor_deflate.h"
+#include "tcomp_deflatedata.h"
+
+#include "tsk_debug.h"
+
+#include <string.h>
+
+#define TCOMP_MIN(a, b) (a < b ? a : b)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+/// @brief Compress SIgComp message using deflate algorithm.
+///
+/// @param [in,out] lpCompartment If non-null, the pointer to a compartment.
+/// @param [in,out] input_ptr If non-null, the input pointer.
+/// @param input_size Size of the input.
+/// @param [in,out] output_ptr If non-null, the output pointer.
+/// @param [in,out] output_size If non-null, size of the output.
+/// @param stream The stream.
+///
+/// @return .
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t tcomp_compressor_deflate_compress(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)
+{
+#define GET_OUTPUT_BUFFER_AT(position) (((uint8_t*)output_ptr) + position)
+
+ tsk_bool_t result = tsk_true;
+ int stateChanged, stateful, windowBits, zret;
+ tcomp_deflatedata_t *deflatedata = 0;
+ tsk_size_t pointer = 0, state_len_index = 0, compressedDataLen;
+ uint8_t smsCode, *header;
+
+ tsk_safeobj_lock(lpCompartment);
+
+ /* Compression Data */
+ if(!lpCompartment->compressorData){
+ lpCompartment->compressorData = tcomp_deflatedata_create(stream);
+ if(!lpCompartment->compressorData){
+ TSK_DEBUG_ERROR("Failed to create deflate compressor data.");
+ result = tsk_false;
+ goto bail;
+ }
+ else{
+ lpCompartment->ackGhost = tcomp_deflatedata_ackGhost;
+ lpCompartment->freeGhostState = tcomp_deflatedata_freeGhostState;
+ lpCompartment->compressorData_isStream = stream;
+ }
+ }
+
+ deflatedata = lpCompartment->compressorData;
+
+ /* State memory size code */
+ smsCode = TCOMP_MIN(lpCompartment->remote_parameters->smsCode, lpCompartment->remote_parameters->dmsCode);
+#if USE_ONLY_ACKED_STATES
+ stateful = (deflatedata->ghostState && tcomp_deflatedata_isStateful(deflatedata));
+#else
+ stateful = (deflatedata->ghostState != 0);
+#endif
+
+ /*
+ * Init zLIB
+ */
+ windowBits = ( smsCode - (stream?2:1) ) + 10;
+ windowBits = (windowBits < 8) ? 8 : ( (windowBits > 15 ? 15 : windowBits) ); /* Because of zlib limitation (windowsize MUST be between 8 and 15) */
+ if(windowBits != deflatedata->zWindowBits){
+ /* Window size changed */
+ tcomp_deflatedata_freeGhostState(deflatedata);
+ tcomp_deflatedata_zSetWindowBits(deflatedata, windowBits);
+
+ if( !(result = tcomp_deflatedata_zReset(deflatedata)) ) {
+ goto bail;
+ }
+ }
+ else if(!deflatedata->ghostState){
+ /* No ghost --> reset zlib */
+ deflatedata->ghost_copy_offset = 0;
+ if( !(result = tcomp_deflatedata_zReset(deflatedata)) ) {
+ goto bail;
+ }
+ }
+
+ /*
+ * SigComp headers
+ */
+ header = GET_OUTPUT_BUFFER_AT(pointer++);
+
+
+ /* SigComp Header */
+ if(lpCompartment->lpReqFeedback && tcomp_buffer_getSize(lpCompartment->lpReqFeedback)){
+ /* Return the requested feedback */
+ *header = 0xfc; /* T=1 */
+ memcpy(GET_OUTPUT_BUFFER_AT(pointer), tcomp_buffer_getBuffer(lpCompartment->lpReqFeedback), tcomp_buffer_getSize(lpCompartment->lpReqFeedback));
+ pointer += tcomp_buffer_getSize(lpCompartment->lpReqFeedback);
+ }
+ else{
+ *header = 0xf8;
+ }
+
+ /*
+ * Stateless or stateful?
+ */
+ if(stateful){
+ memcpy(GET_OUTPUT_BUFFER_AT(pointer), tcomp_buffer_getBuffer(deflatedata->ghostState->identifier), TCOMP_PARTIAL_ID_LEN_VALUE);
+
+ pointer += TCOMP_PARTIAL_ID_LEN_VALUE;
+ *header |= TCOMP_PARTIAL_ID_LEN_CODE;
+
+ TSK_DEBUG_INFO("Compressing stateful message.");
+ }
+ else{
+ uint16_t codeLen = DEFLATE_BYTECODE_LEN;
+ /* first byte for codelen */
+ *GET_OUTPUT_BUFFER_AT(pointer++) = ((codeLen>>4)& 0x00ff);
+ /* last 4 bits for codelen */
+ *GET_OUTPUT_BUFFER_AT(pointer) = ((codeLen & 0x000f)<<4);
+ /* first and last 4 bits for destination */
+ *GET_OUTPUT_BUFFER_AT(pointer++) |= DEFLATE_BYTECODE_DESTINATION_CODE;
+
+ /*
+ * Upload UDVM bytecode
+ */
+ memcpy(GET_OUTPUT_BUFFER_AT(pointer), (const uint8_t*)DEFLATEDATA_DEFLATE_BYTECODE, codeLen);
+ pointer += codeLen;
+
+ //////////////////////////////////////////////////
+ // FIXME: check for overflow and >=320
+ //
+ // [DMS]+[Req. Fed. Loc.]+[state_len]+[cpb||dms||sms]+[Sigcomp_version]+[states]
+ //*output_buffer.getBuffer(pointer++) = 0x04; //reserved=0, Q=1, S=0, I=0
+ //*output_buffer.getBuffer(pointer++) = (this->req_feedback_item++); //requested feedback item
+
+ state_len_index = pointer;
+ *GET_OUTPUT_BUFFER_AT(pointer) = 0x00, pointer += 4; /* [hash_len]+[state_len] */
+ *GET_OUTPUT_BUFFER_AT(pointer++) = (tcomp_params_getParameters(lpCompartment->local_parameters)>>8); // [cpb||dms||sms]
+ *GET_OUTPUT_BUFFER_AT(pointer++) = (tcomp_params_getParameters(lpCompartment->local_parameters)&0x00ff); // [Sigcomp_version]
+#if USE_DICTS_FOR_COMPRESSION
+ *output_buffer.getBuffer(pointer++) = 0x00; // First dict byte // FIXME
+ *output_buffer.getBuffer(pointer++) = DEFLATE_FIXME_DICT; // FIXME: also change ghost
+#endif
+ TSK_DEBUG_INFO("Compressing stateless message.");
+ }
+
+ /*
+ * Compress data using ZLIB
+ */
+ compressedDataLen = (*output_size - pointer);
+ zret = tcomp_deflatedata_zCompress(deflatedata, input_ptr, input_size, GET_OUTPUT_BUFFER_AT(pointer), &compressedDataLen, &stateChanged);
+ if(!zret){
+ result = tsk_false;
+ goto bail;
+ }
+ pointer += compressedDataLen;
+ *output_size = (pointer);
+
+ /*
+ * Update state length
+ */
+ if(!stateful){
+ uint16_t state_len = ( (1<<(deflatedata->zWindowBits)) + DEFLATE_UDVM_CIRCULAR_START_INDEX - 64 );
+ uint32_t hash_len = (state_len + 8);
+
+ // FIXME: 131072 could not go in 2-bytes
+ *GET_OUTPUT_BUFFER_AT(state_len_index) = (hash_len >> 8);
+ *GET_OUTPUT_BUFFER_AT(state_len_index+1) = (hash_len & 0x00ff);
+ *GET_OUTPUT_BUFFER_AT(state_len_index+2) = (state_len >> 8);
+ *GET_OUTPUT_BUFFER_AT(state_len_index+3) = (state_len & 0x00ff);
+
+ /* First time or synchronize failure (NACK reason=STATE_NOT_FOUND) */
+ if(!deflatedata->ghostState){
+ tcomp_deflatedata_createGhost(deflatedata, state_len, lpCompartment->local_parameters);
+ }
+ }
+#if USE_ONLY_ACKED_STATES
+ if(stateChanged)
+#endif
+ {
+ tcomp_deflatedata_updateGhost(deflatedata, (const uint8_t*)input_ptr, input_size);
+ }
+
+ //output_buffer.print(2000);
+
+bail:
+ tsk_safeobj_unlock(lpCompartment);
+
+ return result;
+
+#undef GET_OUTPUT_BUFFER_AT
+}
diff --git a/tinySIGCOMP/src/tcomp_compressor_deflate.h b/tinySIGCOMP/src/tcomp_compressor_deflate.h
new file mode 100644
index 0000000..3de802a
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressor_deflate.h
@@ -0,0 +1,42 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief Deflate compressor.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSORDEFLATE_H
+#define TCOMP_COMPRESSORDEFLATE_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_compartment.h"
+
+TCOMP_BEGIN_DECLS
+
+tsk_bool_t tcomp_compressor_deflate_compress(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream);
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSORDEFLATE_H */
diff --git a/tinySIGCOMP/src/tcomp_compressor_dummy.c b/tinySIGCOMP/src/tcomp_compressor_dummy.c
new file mode 100644
index 0000000..204caf0
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressor_dummy.c
@@ -0,0 +1,104 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor_dummy.h
+ * @brief SigComp Dummy compressor. Used if none match. See RFC 4896 subclause 11.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#include "tcomp_compressor_dummy.h"
+#include "tcomp_buffer.h"
+
+#include <string.h>
+
+#define UNCOMPRESSED_BYTECODE_LENGTH 13
+#define UNCOMPRESSED_BYTECODE_DESTINATION_CODE 0x01 /* 128 */
+#define DUMMYCOMPRESSOR_UNCOMPRESSED_BYTECODE \
+ "\xf8\x00\xa1\x1c\x01\x86\x09\x22\x86\x01\x16\xf9\x23"
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+/// @brief Dummy compressor as per RFC 4896 subclause 11. This function is used to create uncompressed sigcomp message.
+/// Used if none match.
+///
+/// @param [in,out] lpCompartment The compartment to use.
+/// @param [in,out] input_ptr The input buffer containing the message to compress.
+/// @param input_size The size of the input buffer.
+/// @param [in,out] output_ptr The output buffer where to copy the compressed message.
+/// @param [in,out] output_size The size of the output buffer.
+/// @param stream Indicates whether it's a stream buffer or not.
+///
+/// @return 1 if succedd and 0 otherwise.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t tcomp_compressor_dummy_compress(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)
+{
+ tcomp_buffer_handle_t *output_buffer = tcomp_buffer_create_null();
+ tsk_size_t pointer = 0;
+ uint8_t *header;
+ uint16_t codeLen;
+
+ tcomp_buffer_referenceBuff(output_buffer, (uint8_t*)output_ptr, *output_size);
+ header = tcomp_buffer_getBufferAtPos(output_buffer, pointer++);
+
+ /* SigComp Header */
+ if(lpCompartment->lpReqFeedback && tcomp_buffer_getSize(lpCompartment->lpReqFeedback)){
+ /* Return the requested feedback */
+ *header = 0xfc; /* T=1 */
+ memcpy(tcomp_buffer_getBufferAtPos(output_buffer, pointer), tcomp_buffer_getBuffer(lpCompartment->lpReqFeedback), tcomp_buffer_getSize(lpCompartment->lpReqFeedback));
+ pointer += tcomp_buffer_getSize(lpCompartment->lpReqFeedback);
+ }
+ else{
+ *header = 0xf8;
+ }
+
+ codeLen = UNCOMPRESSED_BYTECODE_LENGTH;
+ /* first byte for codelen */
+ *tcomp_buffer_getBufferAtPos(output_buffer, pointer++) = ((codeLen>>4)& 0x00ff);
+
+ /* last 4 bits for codelen */
+ *tcomp_buffer_getBufferAtPos(output_buffer, pointer) = ((codeLen & 0x000f)<<4);
+
+ /* first and last 4 bits for destination */
+ *tcomp_buffer_getBufferAtPos(output_buffer, pointer++) |= UNCOMPRESSED_BYTECODE_DESTINATION_CODE;
+
+ /*
+ * Upload UDVM bytecode
+ */
+ memcpy(tcomp_buffer_getBufferAtPos(output_buffer, pointer), (uint8_t*)DUMMYCOMPRESSOR_UNCOMPRESSED_BYTECODE, codeLen);
+ pointer += codeLen;
+
+ /*
+ * Copy data uncompressed
+ */
+ memcpy(tcomp_buffer_getBufferAtPos(output_buffer, pointer), input_ptr, input_size);
+ pointer += input_size;
+ *output_size = (pointer);
+
+ TSK_OBJECT_SAFE_FREE(output_buffer);
+
+ return tsk_true;
+}
diff --git a/tinySIGCOMP/src/tcomp_compressor_dummy.h b/tinySIGCOMP/src/tcomp_compressor_dummy.h
new file mode 100644
index 0000000..3e0ab97
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressor_dummy.h
@@ -0,0 +1,43 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor_dummy.h
+ * @brief SigComp dummy compresor. Used if none match. See RFC 4896 subclause 11.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSOR_DUMMY_H
+#define TCOMP_COMPRESSOR_DUMMY_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_compartment.h"
+
+TCOMP_BEGIN_DECLS
+
+tsk_bool_t tcomp_compressor_dummy_compress(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream);
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSOR_DUMMY_H */
+
diff --git a/tinySIGCOMP/src/tcomp_compressordata.c b/tinySIGCOMP/src/tcomp_compressordata.c
new file mode 100644
index 0000000..177ed2f
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressordata.c
@@ -0,0 +1,115 @@
+///*
+//* Copyright (C) 2009-2010 Mamadou Diop.
+//*
+//* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+//*
+//* This file is part of Open Source Doubango Framework.
+//*
+//* DOUBANGO is free software: you can redistribute it and/or modify
+//* it under the terms of the GNU General Public License as published by
+//* the Free Software Foundation, either version 3 of the License, or
+//* (at your option) any later version.
+//*
+//* DOUBANGO 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 General Public License for more details.
+//*
+//* You should have received a copy of the GNU General Public License
+//* along with DOUBANGO.
+//*
+//*/
+//
+///**@file tcomp_compressordata.c
+// * @brief SigComp compressor data.
+// *
+// * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+// *
+// * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+// */
+//#include "tcomp_compressordata.h"
+//
+//#include "tsk_debug.h"
+//
+//#include <assert.h>
+//
+//
+///**@ingroup tcomp_compressordata_group
+//*/
+//void tcomp_compressordata_ackGhost(tcomp_compressordata_t *compdata, const tcomp_buffer_handle_t *stateid)
+//{
+// if(compdata)
+// {
+// tsk_safeobj_lock(compdata);
+// assert(0);
+// tsk_safeobj_unlock(compdata);
+// }
+// else
+// {
+// TSK_DEBUG_ERROR("NULL compressor data.");
+// }
+//}
+//
+///**@ingroup tcomp_compressordata_group
+//*/
+//void tcomp_compressordata_freeGhostState(tcomp_compressordata_t *compdata)
+//{
+// if(compdata)
+// {
+// tsk_safeobj_lock(compdata);
+// assert(0);
+// tsk_safeobj_unlock(compdata);
+// }
+// else
+// {
+// TSK_DEBUG_ERROR("NULL compressor data.");
+// }
+//}
+//
+//
+//
+//
+//
+//
+//
+//
+//
+////========================================================
+//// SigComp compressor data object definition
+////
+//static void* tcomp_compressordata_create(void * self, va_list * app)
+//{
+// tcomp_compressordata_t *compdata = self;
+// if(compdata)
+// {
+// /* Initialize safeobject */
+// tsk_safeobj_init(compdata);
+//
+// compdata->isStream = va_arg(*app, int);
+// }
+//
+// return self;
+//}
+//
+//static void* tcomp_compressordata_destroy(void *self)
+//{
+// tcomp_compressordata_t *compdata = self;
+// if(compdata)
+// {
+// /* Deinitialize safeobject */
+// tsk_safeobj_deinit(compdata);
+//
+// TSK_OBJECT_SAFE_FREE(compdata->ghostState);
+// }
+//
+// return self;
+//}
+//
+//static const tsk_object_def_t tsk_compressordata_def_s =
+//{
+// sizeof(tcomp_compressordata_t),
+// tcomp_compressordata_create,
+// tcomp_compressordata_destroy,
+// 0
+//};
+//const void *tcomp_compressordata_def_t = &tsk_compressordata_def_s;
diff --git a/tinySIGCOMP/src/tcomp_compressordata.h b/tinySIGCOMP/src/tcomp_compressordata.h
new file mode 100644
index 0000000..988d00b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressordata.h
@@ -0,0 +1,75 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressordata.h
+ * @brief SigComp compressor data.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSOR_DATA_H
+#define TCOMP_COMPRESSOR_DATA_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_buffer.h"
+
+TCOMP_BEGIN_DECLS
+
+typedef void tcomp_compressordata_t;
+
+typedef void (*tcomp_xxx_freeGhostState)(tcomp_compressordata_t *data);
+typedef void (*tcomp_xxx_ackGhost)(tcomp_compressordata_t *data, const tcomp_buffer_handle_t *stateid);
+
+#define TCOMP_DECLARE_COMPRESSORDATA \
+ void *compressorData; \
+ unsigned compressorData_isStream; \
+ tcomp_xxx_freeGhostState freeGhostState; \
+ tcomp_xxx_ackGhost ackGhost
+
+//#include "tcomp_state.h"
+//#include "tcomp_buffer.h"
+//
+//#include "tsk_object.h"
+//#include "tsk_safeobj.h"
+//
+//#define TCOMP_COMPRESSORDATA_CREATE(isStream) tsk_object_new(tsk_compressordata_def_t, isStream)
+//
+//typedef struct tcomp_compressordata_s
+//{
+// TSK_DECLARE_OBJECT;
+//
+// tcomp_state_t *ghostState;
+// unsigned isStream:1;
+//
+// TSK_DECLARE_SAFEOBJ;
+//}
+//tcomp_compressordata_t;
+//
+//void tcomp_compressordata_ackGhost(tcomp_compressordata_t *compdata, const tcomp_buffer_handle_t *stateid);
+//void tcomp_compressordata_freeGhostState(tcomp_compressordata_t *compdata);
+//
+//TINYSIGCOMP_GEXTERN const void *tcomp_compressordata_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSOR_DATA_H */
diff --git a/tinySIGCOMP/src/tcomp_compressordisp.c b/tinySIGCOMP/src/tcomp_compressordisp.c
new file mode 100644
index 0000000..31a4022
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressordisp.c
@@ -0,0 +1,240 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressordisp.h
+ * @brief Entity that receives application messages, invokes a compressor,and forwards the resulting SigComp compressed messages to a remote
+ * endpoint.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_compressordisp.h"
+#include "tcomp_compressor_dummy.h"
+#include "tcomp_compressor_deflate.h"
+
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+#include <string.h>
+
+/**Checks whether NACK (RFC 4077) handling is supported
+*/
+#define TCOMP_NACK_SUPPORTED (dispatcher->stateHandler->sigcomp_parameters->SigComp_version >= 0x02)
+
+
+/**Creates new compressor dispatcher.
+*/
+tcomp_compressordisp_t* tcomp_compressordisp_create(const tcomp_statehandler_t* statehandler)
+{
+ return tsk_object_new(tcomp_compressordisp_def_t, statehandler);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// Compress a message.
+///
+/// @param [in,out] dispatcher The compressor dispatcher.
+/// @param compartmentId The compartment to use to compress the message.
+/// @param [in,out] input_ptr The message to compress.
+/// @param input_size The size of the input buffer.
+/// @param [in,out] output_ptr The output buffer to copy the compressed data.
+/// @param [in,out] output_size The size of the output buffer.
+/// @param stream Indicates whether it's a stream buffer or not.
+///
+/// @return @a tsk_true if succeed and @a tsk_false otherwize.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t tcomp_compressordisp_compress(tcomp_compressordisp_t *dispatcher, uint64_t compartmentId, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)
+{
+ tsk_bool_t ret = tsk_true;
+ int i = 0;
+
+ /* For each compartment id create/retrieve one compressor instance */
+ tcomp_compartment_t *lpCompartment = tcomp_statehandler_getCompartment(dispatcher->stateHandler, compartmentId);
+
+ if(!lpCompartment){
+ TSK_DEBUG_ERROR("You must provide a valid compartment to perform compression.");
+ return tsk_false;
+ }
+
+
+ /*
+ * Performs compression.
+ */
+ tsk_safeobj_lock(dispatcher);
+
+ for( i = 0; (i < TCOMP_MAX_COMPRESSORS && dispatcher->compressors[i]); i++ ){
+ if((ret = dispatcher->compressors[i](lpCompartment, input_ptr, input_size, output_ptr, output_size, stream))) {
+ break;
+ }
+ }
+
+ tsk_safeobj_unlock(dispatcher);
+
+
+ /*
+ * STREAM case. FIXME:Because I'm a lazy man I only support 0xFF00 case
+ */
+ if(stream){
+ uint8_t* escapedBuffer;
+ tsk_size_t i, j;
+ tsk_size_t escapedBufferSize = (*output_size + 2); /* 2 = strlen(0xffff) */
+
+ for(i = 0; i < *output_size ; i++) {
+ escapedBufferSize += ((uint8_t*)output_ptr)[i] == 0xff ? 1 : 0;
+ }
+ escapedBuffer = (uint8_t*)tsk_calloc(escapedBufferSize, sizeof(uint8_t));
+
+ for(i = 0, j = 0; i < *output_size; i++, j++){
+ escapedBuffer[j] = ((uint8_t*)output_ptr)[i];
+ if(escapedBuffer[j] == 0xff) {
+ escapedBuffer[++j] = 0x00;
+ }
+ }
+
+ /* End stream */
+ escapedBuffer[escapedBufferSize-1] = escapedBuffer[escapedBufferSize-2] = 0xff;
+ memcpy(output_ptr, escapedBuffer, escapedBufferSize);
+
+ *output_size = escapedBufferSize; /* Update size */
+ TSK_FREE(escapedBuffer); /* free */
+ }
+
+ /*
+ * NACK
+ */
+ if(ret && TCOMP_NACK_SUPPORTED){
+ /* store nack for later retrieval in case of errors */
+ uint8_t nackId[TSK_SHA1_DIGEST_SIZE];
+ tsk_sha1context_t sha;
+
+ tsk_sha1reset(&sha);
+ tsk_sha1input(&sha, (const uint8_t*)output_ptr, *output_size);
+ tsk_sha1result(&sha, (char*)nackId);
+ tcomp_compartment_addNack(lpCompartment, nackId);
+ }
+
+ return ret;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// Adds new compressor the list of the compressors.
+///
+///
+/// @param [in,out] dispatcher The compressor dispatcher.
+/// @param compressor A function pointer to the new compressor.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+int tcomp_compressordisp_addCompressor(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)
+{
+ tsk_size_t i;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ for(i = 0; i < TCOMP_MAX_COMPRESSORS; i++){
+ if(!dispatcher->compressors[i]){
+ dispatcher->compressors[i] = compressor;
+ return 0;
+ }
+ }
+ return -2;
+}
+
+/** Removes a compressor
+*/
+int tcomp_compressordisp_removeCompressor(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)
+{
+ tsk_size_t i;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ for(i = 0; i < TCOMP_MAX_COMPRESSORS; i++){
+ if(dispatcher->compressors[i] == compressor){
+ dispatcher->compressors[i] = tsk_null;
+ return 0;
+ }
+ }
+ return -2;
+}
+
+
+
+
+
+
+
+
+//========================================================
+// SigComp compressor dispatcher object definition
+//
+static tsk_object_t* tcomp_compressordisp_ctor(tsk_object_t * self, va_list * app)
+{
+ tcomp_compressordisp_t *compressordisp = self;
+ if(compressordisp){
+ int i = 0;
+ compressordisp->stateHandler = va_arg(*app, const tcomp_statehandler_t*);
+
+ compressordisp->compressors[0] = tcomp_compressor_deflate_compress; /* If you don't want deflate compressor then remove this line. */
+ compressordisp->compressors[1] = tcomp_compressor_dummy_compress; /* RFC 4896 [11. Uncompressed Bytecode]. */
+
+ for(i = 2; i < TCOMP_MAX_COMPRESSORS; i++){
+ compressordisp->compressors[i] = 0;
+ }
+
+ /* Initialize safeobject */
+ tsk_safeobj_init(compressordisp);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new compressor dispatcher.");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_compressordisp_dtor(tsk_object_t *self)
+{
+ tcomp_compressordisp_t *compressordisp = self;
+ if(compressordisp){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(compressordisp);
+
+ // FIXME: clear compressors
+ }
+ else{
+ TSK_DEBUG_ERROR("Null dispatcher.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_compressordisp_def_s =
+{
+ sizeof(tcomp_compressordisp_t),
+ tcomp_compressordisp_ctor,
+ tcomp_compressordisp_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_compressordisp_def_t = &tcomp_compressordisp_def_s;
diff --git a/tinySIGCOMP/src/tcomp_compressordisp.h b/tinySIGCOMP/src/tcomp_compressordisp.h
new file mode 100644
index 0000000..df12685
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_compressordisp.h
@@ -0,0 +1,74 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressordisp.h
+ * @brief Entity that receives application messages, invokes a compressor,and forwards the resulting SigComp compressed messages to a remote
+ * endpoint.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSORDISP_H
+#define TCOMP_COMPRESSORDISP_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_statehandler.h"
+#include "tcomp_buffer.h"
+#include "tcomp_types.h"
+#include "tcomp_result.h"
+#include "tcomp_compressor.h"
+
+#include "tsk_list.h"
+#include "tsk_object.h"
+#include "tsk_safeobj.h"
+
+TCOMP_BEGIN_DECLS
+
+
+#define TCOMP_MAX_COMPRESSORS 5
+
+/**Compressor dispatcher.
+*/
+typedef struct tcomp_compressordisp_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tcomp_compressor_compress_f compressors[TCOMP_MAX_COMPRESSORS];
+ const tcomp_statehandler_t* stateHandler;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_compressordisp_t;
+
+tcomp_compressordisp_t* tcomp_compressordisp_create(const tcomp_statehandler_t* statehandler);
+
+tsk_bool_t tcomp_compressordisp_compress(tcomp_compressordisp_t *dispatcher, uint64_t compartmentId, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream);
+
+int tcomp_compressordisp_addCompressor(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor);
+int tcomp_compressordisp_removeCompressor(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_compressordisp_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSORDISP_H */
diff --git a/tinySIGCOMP/src/tcomp_decompressordisp.c b/tinySIGCOMP/src/tcomp_decompressordisp.c
new file mode 100644
index 0000000..245b5f4
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_decompressordisp.c
@@ -0,0 +1,412 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_decompressordisp.c
+ * @brief Entity that receives SigComp messages, invokes a UDVM, and forwards the resulting decompressed messages to the application.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_decompressordisp.h"
+#include "tcomp_message.h"
+#include "tcomp_udvm.h"
+
+#include "tsk_debug.h"
+
+#include <assert.h>
+#include <string.h>
+
+#define TCOMP_MAX_STREAM_BUFFER_SIZE 65535
+#define TCOMP_NACK_SUPPORTED(dispatcher) (dispatcher->stateHandler->sigcomp_parameters->SigComp_version >= 0x02)
+
+
+/**Prefdicate function
+*/
+static int pred_find_streambuffer_by_id(const tsk_list_item_t *item, const void *id)
+{
+ if(item && item->data)
+ {
+ tcomp_stream_buffer_t *streambuffer = item->data;
+ uint64_t res = (streambuffer->id - *((uint64_t*)id));
+ return res > 0 ? (int)1 : (res < 0 ? (int)-1 : (int)0);
+ }
+ return -1;
+}
+
+tcomp_stream_buffer_t* tcomp_stream_buffer_create(uint64_t id)
+{
+ return tsk_object_new(tcomp_stream_buffer_def_t, id);
+}
+
+tcomp_decompressordisp_t* tcomp_decompressordisp_create(const tcomp_statehandler_t* statehandler)
+{
+ return tsk_object_new(tcomp_decompressordisp_def_t, statehandler);
+}
+
+/**Decompress a message.
+*/
+tsk_bool_t tcomp_decompressordisp_decompress(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)
+{
+ tsk_bool_t ret = tsk_true;
+ uint64_t streamId = 0;
+ const tsk_list_item_t *item_const;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return tsk_false;
+ }
+
+ /*
+ * Check if transport type changed.
+ */
+ if(lpResult->isStreamBased){
+ if(!dispatcher->streamBuffers){
+ dispatcher->streamBuffers = tsk_list_create();
+ }
+
+ streamId = lpResult->streamId;
+ ret = tcomp_decompressordisp_appendStream(dispatcher, input_ptr, input_size, streamId);
+ if(!ret){
+ TSK_DEBUG_ERROR("Failed to append new stream buffer.");
+ return 0;
+ }
+ }
+
+ if(lpResult->isStreamBased){
+ tsk_size_t size = 0;
+ uint16_t discard_count = 0;
+ tcomp_stream_buffer_t *lpBuffer;
+
+ item_const = tsk_list_find_item_by_pred(dispatcher->streamBuffers, pred_find_streambuffer_by_id, &streamId);
+ if(!item_const || !(lpBuffer = item_const->data)){
+ TSK_DEBUG_ERROR("Failed to find stream buffer by id %llu.", streamId);
+ return 0;
+ }
+
+ if(ret && tcomp_decompressordisp_getNextStreamMsg(dispatcher, streamId, &discard_count, &size)){
+ ret &= tcomp_decompressordisp_internalDecompress(dispatcher, tcomp_buffer_getBuffer(lpBuffer->buffer), size, &lpResult);
+
+ /* remove buffer and discard */
+ tcomp_buffer_discardLastBytes(lpBuffer->buffer, discard_count);
+ ret &= tcomp_buffer_removeBuff(lpBuffer->buffer, 0, size);
+ }
+ if(discard_count){
+ tcomp_buffer_discardLastBytes(lpBuffer->buffer, discard_count);
+ }
+ if(size){
+ //ret&= lpBuffer->removeBuff(0, (size));
+ }
+ }
+ else{
+ ret &= tcomp_decompressordisp_internalDecompress(dispatcher, input_ptr, input_size, &lpResult);
+ }
+
+ return ret;
+}
+
+/**Gets the next message from the queue.
+*/
+tsk_bool_t tcomp_decompressordisp_getNextMessage(tcomp_decompressordisp_t *dispatcher, tcomp_result_t *lpResult)
+{
+ tsk_bool_t ret = tsk_true;
+ tsk_size_t size=0;
+ uint16_t discard_count = 0;
+ uint64_t streamId;
+ tcomp_stream_buffer_t *lpBuffer;
+ const tsk_list_item_t *item_const;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return tsk_false;
+ }
+
+ streamId = lpResult->streamId;
+
+ item_const = tsk_list_find_item_by_pred(dispatcher->streamBuffers, pred_find_streambuffer_by_id, &streamId);
+ if(!item_const || !(lpBuffer = item_const->data)){
+ TSK_DEBUG_ERROR("Failed to find stream buffer by id %llu.", streamId);
+ return tsk_false;
+ }
+
+ if(ret && tcomp_decompressordisp_getNextStreamMsg(dispatcher, streamId, &discard_count, &size)){
+ ret &= tcomp_decompressordisp_internalDecompress(dispatcher, tcomp_buffer_getBuffer(lpBuffer->buffer), size, &lpResult);
+
+ /* remove buffer and discard */
+ tcomp_buffer_discardLastBytes(lpBuffer->buffer, discard_count);
+ ret &= tcomp_buffer_removeBuff(lpBuffer->buffer, 0, size);
+ }
+ else {
+ ret = tsk_false; /* Is it right? */
+ }
+
+ if(discard_count){
+ tcomp_buffer_discardLastBytes(lpBuffer->buffer, discard_count);
+ }
+ return ret;
+}
+
+/**Decompress a message.
+*/
+tsk_bool_t tcomp_decompressordisp_internalDecompress(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, const tsk_size_t input_size, tcomp_result_t **lpResult)
+{
+ tcomp_message_t *sigCompMessage = tsk_null;
+ tcomp_udvm_t *sigCompUDVM = tsk_null;
+ tsk_bool_t ret = tsk_false;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ goto bail;
+ }
+
+ sigCompMessage = tcomp_message_create(input_ptr, input_size, (*lpResult)->isStreamBased);
+ if(!sigCompMessage || !sigCompMessage->isOK){
+ TSK_DEBUG_ERROR("Failed to create new sigcomp message.");
+ goto bail;
+ }
+ else if(sigCompMessage->isNack && TCOMP_NACK_SUPPORTED(dispatcher)){
+ /* Remote party send us a NACK --> handle it */
+ tcomp_statehandler_handleNack((tcomp_statehandler_t*)dispatcher->stateHandler, (const tcomp_nackinfo_t*)sigCompMessage->nack_info);
+ (*lpResult)->isNack = tsk_true;
+
+ goto bail;
+ }
+
+ /* Create new UDVM entity for each SigComp message */
+ sigCompUDVM = tcomp_udvm_create(sigCompMessage, (tcomp_statehandler_t*)dispatcher->stateHandler, *lpResult);
+
+ /* Decompress message */
+ ret = tcomp_udvm_decompress(sigCompUDVM);
+
+ /* decompression failed --> returns nack if supported */
+ if(!ret){
+ /* Decompression failed --> return NACK message to the application layer */
+ (*lpResult)->isNack = TCOMP_NACK_SUPPORTED(dispatcher);
+ }
+
+bail:
+ /* Delete Message */
+ TSK_OBJECT_SAFE_FREE(sigCompMessage);
+
+ /* Delete UDVM entity */
+ TSK_OBJECT_SAFE_FREE(sigCompUDVM);
+
+ return ret;
+}
+
+/**Appends stream buffer.
+*/
+tsk_bool_t tcomp_decompressordisp_appendStream(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, tsk_size_t input_size, uint64_t streamId)
+{
+ tcomp_stream_buffer_t* lpBuffer = tsk_null;
+ const tsk_list_item_t *item_const;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return tsk_false;
+ }
+
+ item_const = tsk_list_find_item_by_pred(dispatcher->streamBuffers, pred_find_streambuffer_by_id, &streamId);
+ if(!item_const || !(lpBuffer = item_const->data)){
+ /* First time we get this stream ID */
+ tcomp_buffer_handle_t *newbuf = tcomp_stream_buffer_create(streamId);
+ if(newbuf){
+ lpBuffer = newbuf;
+ lpBuffer->buffer = tcomp_buffer_create_null();
+ tsk_list_push_back_data(dispatcher->streamBuffers, ((void**) &newbuf));
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new stream buffer.");
+ return tsk_false;
+ }
+ }
+
+ /* Check if buffer is too large */
+ if(lpBuffer->buffer && (tcomp_buffer_getSize(lpBuffer->buffer) + input_size) > TCOMP_MAX_STREAM_BUFFER_SIZE){
+ tcomp_buffer_freeBuff(lpBuffer->buffer);
+ return tsk_false;
+ }
+
+ /* append new buffer */
+ if(!tcomp_buffer_appendBuff(lpBuffer->buffer, input_ptr, input_size)){
+ TSK_DEBUG_ERROR("Failed to append new buffer.");
+ tcomp_buffer_freeBuff(lpBuffer->buffer);
+ return tsk_false;
+ }
+
+ return tsk_true;
+}
+
+/**Gets the next message from the queue.
+*/
+tsk_bool_t tcomp_decompressordisp_getNextStreamMsg(tcomp_decompressordisp_t *dispatcher, uint64_t streamId, uint16_t *discard_count, tsk_size_t *size)
+{
+ tcomp_stream_buffer_t *lpBuffer;
+ const tsk_list_item_t *item_const;
+
+ uint8_t quote_count = 0;
+ uint8_t* start;
+ uint8_t* end;
+
+ if(!dispatcher){
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return tsk_false;
+ }
+
+ /*
+ * RFC 3320 - 4.2.1. Decompressor Dispatcher Strategies [strategie 1]
+ */
+ item_const = tsk_list_find_item_by_pred(dispatcher->streamBuffers, pred_find_streambuffer_by_id, &streamId);
+ if(!item_const || !(lpBuffer = item_const->data)){
+ TSK_DEBUG_ERROR("Failed to find stream buffer by id %llu.", streamId);
+ return tsk_false;
+ }
+
+ *size = 0;
+ *discard_count = 0;
+
+ quote_count = 0;
+ start = tcomp_buffer_getBuffer(lpBuffer->buffer);
+ end = (start + tcomp_buffer_getSize(lpBuffer->buffer));
+
+ while(start<end){
+ if(*start==0xff){
+ start++;
+ if(*start==0xff)
+ { /* end message */
+ if(*size) return tsk_true;
+ else /* message is empty --> delete this empty message(length=2) */
+ {
+ start--;
+ memcpy(start, (start+2), (end-start));
+ (*discard_count)+=2;
+ end-=2;
+ continue;
+ }
+ }
+
+ quote_count = *start;
+ memcpy((start), (start+1), (end-start));
+ end--;
+ (*discard_count)++;
+ start+=(quote_count);
+ (*size)+=(1+quote_count);
+ }else { start++; (*size)++; }
+ }
+
+ return tsk_false;
+}
+
+
+
+
+
+
+
+
+
+
+//========================================================
+// SigComp decompressor dispatcher object definition
+//
+static tsk_object_t* tcomp_decompressordisp_ctor(tsk_object_t* self, va_list * app)
+{
+ tcomp_decompressordisp_t *decompressordisp = self;
+ if(decompressordisp){
+ decompressordisp->stateHandler = va_arg(*app, const tcomp_statehandler_t*);
+
+ /* Initialize safeobject */
+ tsk_safeobj_init(decompressordisp);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new decompressor dispatcher.");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_decompressordisp_dtor(tsk_object_t *self)
+{
+ tcomp_decompressordisp_t *decompressordisp = self;
+ if(decompressordisp){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(decompressordisp);
+
+ TSK_OBJECT_SAFE_FREE(decompressordisp->streamBuffers);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null dispatcher.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_decompressordisp_def_s =
+{
+ sizeof(tcomp_decompressordisp_t),
+ tcomp_decompressordisp_ctor,
+ tcomp_decompressordisp_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_decompressordisp_def_t = &tcomp_decompressordisp_def_s;
+
+
+
+
+//========================================================
+// SigComp stream buffer object definition
+//
+
+static tsk_object_t* tcomp_stream_buffer_ctor(tsk_object_t* self, va_list * app)
+{
+ tcomp_stream_buffer_t *stream_buffer = self;
+ if(stream_buffer){
+ stream_buffer->id = va_arg(*app, uint64_t);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new stream buffer.");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_stream_buffer_dtor(tsk_object_t* self)
+{
+ tcomp_stream_buffer_t *stream_buffer = self;
+ if(stream_buffer){
+ TSK_OBJECT_SAFE_FREE(stream_buffer->buffer);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null stream buffer.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_stream_buffer_def_s =
+{
+ sizeof(tcomp_stream_buffer_t),
+ tcomp_stream_buffer_ctor,
+ tcomp_stream_buffer_dtor,
+ tsk_null
+};
+const tsk_object_def_t* tcomp_stream_buffer_def_t = &tcomp_stream_buffer_def_s;
diff --git a/tinySIGCOMP/src/tcomp_decompressordisp.h b/tinySIGCOMP/src/tcomp_decompressordisp.h
new file mode 100644
index 0000000..df52fd6
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_decompressordisp.h
@@ -0,0 +1,81 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_decompressordisp.h
+ * @brief Entity that receives SigComp messages, invokes a UDVM, and forwards the resulting decompressed messages to the application.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_DECOMPRESSORDISP_H
+#define TCOMP_DECOMPRESSORDISP_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_statehandler.h"
+#include "tcomp_buffer.h"
+#include "tcomp_types.h"
+#include "tcomp_result.h"
+
+
+#include "tsk_object.h"
+#include "tsk_safeobj.h"
+
+TCOMP_BEGIN_DECLS
+
+typedef struct tcomp_stream_buffer_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint64_t id; /**< Buffer identifier */
+ tcomp_buffer_handle_t *buffer; /**< Buffer handle */
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_stream_buffer_t;
+
+typedef struct tcomp_decompressordisp_s
+{
+ TSK_DECLARE_OBJECT;
+
+ const tcomp_statehandler_t* stateHandler;
+ tcomp_stream_buffer_L_t *streamBuffers;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_decompressordisp_t;
+
+tcomp_decompressordisp_t* tcomp_decompressordisp_create(const tcomp_statehandler_t* statehandler);
+
+tsk_bool_t tcomp_decompressordisp_decompress(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult);
+tsk_bool_t tcomp_decompressordisp_getNextMessage(tcomp_decompressordisp_t *dispatcher, tcomp_result_t *lpResult);
+
+tsk_bool_t tcomp_decompressordisp_internalDecompress(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, const tsk_size_t input_size, tcomp_result_t **lpResult);
+tsk_bool_t tcomp_decompressordisp_appendStream(tcomp_decompressordisp_t *dispatcher, const void* input_ptr, tsk_size_t input_size, uint64_t streamId);
+tsk_bool_t tcomp_decompressordisp_getNextStreamMsg(tcomp_decompressordisp_t *dispatcher, uint64_t streamId, uint16_t *discard_count, tsk_size_t *size);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_stream_buffer_def_t;
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_decompressordisp_def_t;
+
+TCOMP_END_DECLS
+
+#endif /*TCOMP_DECOMPRESSORDISP_H*/
diff --git a/tinySIGCOMP/src/tcomp_deflatedata.c b/tinySIGCOMP/src/tcomp_deflatedata.c
new file mode 100644
index 0000000..8dc0bab
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_deflatedata.c
@@ -0,0 +1,108 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief SigComp Deflate compressor(Compressor data).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_deflatedata.h"
+
+#include "tsk_debug.h"
+
+tcomp_deflatedata_t* tcomp_deflatedata_create_2(tsk_bool_t isStream, int z_level, int z_windowBits)
+{
+ return tsk_object_new(tcomp_deflatedata_def_t, isStream, z_level, z_windowBits);
+}
+
+tcomp_deflatedata_t* tcomp_deflatedata_create(tsk_bool_t isStream)
+{
+ return tcomp_deflatedata_create_2(isStream, Z_BEST_COMPRESSION, Z_DEFAULT_WINDOW_BITS);
+}
+
+tsk_bool_t tcomp_deflatedata_isStateful(tcomp_deflatedata_t *deflatedata)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return tsk_false;
+ }
+
+ return deflatedata->stream_acked.stateful;
+}
+
+
+
+
+
+
+
+
+//========================================================
+// Deflate compressor data object definition
+//
+
+static void* tcomp_deflatedata_ctor(void * self, va_list * app)
+{
+ tcomp_deflatedata_t *deflatedata = self;
+ if(deflatedata){
+ /* Initialize safeobject */
+ tsk_safeobj_init(deflatedata);
+
+ deflatedata->stream = va_arg(*app, int);
+ deflatedata->zLevel = va_arg(*app, int);
+ deflatedata->zWindowBits = va_arg(*app, int);;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp defalte data.");
+ }
+
+ return self;
+}
+
+static void* tcomp_deflatedata_dtor(void *self)
+{
+ tcomp_deflatedata_t *deflatedata = self;
+ if(deflatedata){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(deflatedata);
+
+ TSK_OBJECT_SAFE_FREE(deflatedata->ghostState);
+
+ tcomp_deflatedata_zUnInit(deflatedata);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp defalte data.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_deflatedata_def_s =
+{
+ sizeof(tcomp_deflatedata_t),
+ tcomp_deflatedata_ctor,
+ tcomp_deflatedata_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tcomp_deflatedata_def_t = &tsk_deflatedata_def_s;
diff --git a/tinySIGCOMP/src/tcomp_deflatedata.ghost.c b/tinySIGCOMP/src/tcomp_deflatedata.ghost.c
new file mode 100644
index 0000000..f5d5d26
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_deflatedata.ghost.c
@@ -0,0 +1,268 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief SigComp Deflate compressor(Ghost).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_deflatedata.h"
+
+#include "tsk_binaryutils.h"
+#include "tsk_debug.h"
+
+#include <string.h>
+
+/*
+ |<----------------------------DMS--------------------------------->|
+ |<-----SigComp message---->|<------------UDVM memory size--------->|
+ +-+----------+-------------+-----+----------+----------------------+
+ | | bytecode | comp msg | | bytecode | circular buffer |
+ +-+----------+-------------+-----+----------+----------------------+
+ ^ ^
+ | |
+ SigComp header Low bytes of UDVM
+
+I suppose we would like to compress this message "libsigcomp":
+ GHOST STRUCTURE:
+ 0x02bb --> Circular Buffer size (DEFLATE_UDVM_CIRCULAR_START_INDEX = 699)
+ 0x2000 --> DMS (8192)
+ 0x0005 --> See 'libsigcomp/asm/deflate.asm' (MULTILOAD param number five)
+ 0x02c5 --> 709 (DEFLATE_UDVM_CIRCULAR_START_INDEX + strlen("libsigcomp"))
+ ...... --> Remaining MULTILOAD words
+ 0x0682 --> 1666 (HASH_LEN = SMS+8)
+ 0x067a --> 1658 (SMS)
+ 0x1902 --> [CPB+DMS+SMS]+[SigComp version]
+ ------------------------------------------------------------
+ 0x0003 --> DEFLATE_NO_DICT
+ ...... --> Dictionnary words
+ 0x0000 --> FIXME
+ 0x0000 --> FIXME
+ ...... --> Deflate byte code (DeflateCompressor::deflate_bytecode)
+ ...... --> no compressed message
+*/
+
+
+#define GHOST_CB_START_INDEX (0)
+#define GHOST_DMS_INDEX (GHOST_CB_START_INDEX + 2)
+#define GHOST_0x0005_INDEX (GHOST_DMS_INDEX + 2)
+#define GHOST_CB_END_INDEX (GHOST_0x0005_INDEX + 2)
+#define GHOST_HASH_LEN_INDEX (GHOST_CB_END_INDEX + 2 + 236)
+#define GHOST_SMS_INDEX (GHOST_HASH_LEN_INDEX + 2)
+#define GHOST_CPB_DMS_SMS_INDEX (GHOST_SMS_INDEX + 2)
+#define GHOST_VERSION_INDEX (GHOST_CPB_DMS_SMS_INDEX + 1)
+
+
+#define GHOST_BYTECODE1_SIZE (GHOST_VERSION_INDEX + 1)
+
+
+static const char* DeflateData_deflate_bytecode1_ghost =
+{
+ "\xff\xff" // Circular buffer Size (CBS)
+ "\xff\xff" // State Memory Size (DMS)
+ "\x00\x05" // See 'libsigcomp/asm/deflate.asm'
+ "\xff\xff" // (CBS + strlen(input))
+
+ "\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\x09\x00\x00"
+ "\x00\x0a\x00\x01\x00\x0b\x00\x01\x00\x0d\x00\x01\x00\x0f\x00\x01\x00\x11\x00\x02\x00\x13\x00\x02\x00\x17\x00\x02\x00\x1b"
+ "\x00\x02\x00\x1f\x00\x03\x00\x23\x00\x03\x00\x2b\x00\x03\x00\x33\x00\x03\x00\x3b\x00\x04\x00\x43\x00\x04\x00\x53\x00\x04"
+ "\x00\x63\x00\x04\x00\x73\x00\x05\x00\x83\x00\x05\x00\xa3\x00\x05\x00\xc3\x00\x05\x00\xe3\x00\x00\x01\x02\x00\x00\x00\x01"
+ "\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x01\x00\x05\x00\x01\x00\x07\x00\x02\x00\x09\x00\x02\x00\x0d\x00\x03"
+ "\x00\x11\x00\x03\x00\x19\x00\x04\x00\x21\x00\x04\x00\x31\x00\x05\x00\x41\x00\x05\x00\x61\x00\x06\x00\x81\x00\x06\x00\xc1"
+ "\x00\x07\x01\x01\x00\x07\x01\x81\x00\x08\x02\x01\x00\x08\x03\x01\x00\x09\x04\x01\x00\x09\x06\x01\x00\x0a\x08\x01\x00\x0a"
+ "\x0c\x01\x00\x0b\x10\x01\x00\x0b\x18\x01\x00\x0c\x20\x01\x00\x0c\x30\x01\x00\x0d\x40\x01\x00\x0d\x60\x01"
+
+ "\xff\xff" // HASH_LEN
+ "\xff\xff" // SMS
+ "\xff" // [CPB+DMS+SMS]
+ "\xff" // SigComp Version
+};
+
+
+#define GHOST_STATE_ADDRESS 64
+#define GHOST_STATE_INSTRUCTION 492
+#define GHOST_STATE_MIN_ACCESS_LEN 6
+#define GHOST_STATE_RETENTION_PRIORITY 0
+
+/**Creates a Ghost state.
+*/
+void tcomp_deflatedata_createGhost(tcomp_deflatedata_t *deflatedata, uint16_t state_length, tcomp_params_t *params)
+{
+ uint8_t *ghostvalue_ptr = 0;
+#define GHOSTVALUE_AT(position) (ghostvalue_ptr + position)
+
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return;
+ }
+
+ if(deflatedata->ghostState){
+ TSK_DEBUG_ERROR("The defalte data already have a ghost state. This MUST never happen.");
+ return;
+ }
+
+ tsk_safeobj_lock(deflatedata);
+
+ deflatedata->ghostState = tcomp_state_create(state_length, GHOST_STATE_ADDRESS, GHOST_STATE_INSTRUCTION, GHOST_STATE_MIN_ACCESS_LEN, GHOST_STATE_RETENTION_PRIORITY);
+ tcomp_buffer_allocBuff(deflatedata->ghostState->value, state_length);
+ ghostvalue_ptr = tcomp_buffer_getBuffer(deflatedata->ghostState->value);
+
+ memcpy(ghostvalue_ptr, DeflateData_deflate_bytecode1_ghost, GHOST_BYTECODE1_SIZE);
+
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_CB_START_INDEX), DEFLATE_UDVM_CIRCULAR_START_INDEX );
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_DMS_INDEX), state_length+GHOST_STATE_ADDRESS );
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_CB_END_INDEX), (DEFLATE_UDVM_CIRCULAR_START_INDEX + 0/*input_size*/) );
+ // ......
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_HASH_LEN_INDEX), (state_length+8) );
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_SMS_INDEX), state_length );
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_CPB_DMS_SMS_INDEX), tcomp_params_getParameters(params) ); // [cpb+dms+sms]+[version]
+
+ // ------------------------------------------------------------
+
+#define GHOST_DICT_CODE_INDEX (GHOST_BYTECODE1_SIZE)
+#define GHOST_DICT_WORDS_INDEX (GHOST_DICT_CODE_INDEX + 2)
+#if USE_DICTS_FOR_COMPRESSION
+# define GHOST_FIXME2_INDEX (GHOST_DICT_WORDS_INDEX + 4/*Sip dict id len*/)
+#else
+# define GHOST_FIXME2_INDEX (GHOST_DICT_WORDS_INDEX + 0)
+#endif
+#define GHOST_DEFLATE_BYTECODE_INDEX (GHOST_FIXME2_INDEX + 4)
+#define GHOST_INPUT_INDEX (GHOST_DEFLATE_BYTECODE_INDEX + DEFLATE_BYTECODE_LEN)
+
+#if USE_DICTS_FOR_COMPRESSION
+ BINARY_SET_2BYTES( ghostState->getStateValue()->getBuffer(GHOST_DICT_CODE_INDEX), DEFLATE_FIXME_DICT );
+ if( DEFLATE_FIXME_DICT == DEFLATE_NO_DICT ){
+ // Nothing to append
+ }else{
+ if(DEFLATE_FIXME_DICT == DEFLATE_SIP_DICT_ONLY){
+ ::memmove( ghostState->getStateValue()->getBuffer(GHOST_DICT_WORDS_INDEX), RFC3485_DICTIONARY_SIP_IDENTIFIER, 4 );
+ }else{
+ assert(1==0);
+ }
+ }
+#endif
+ memcpy( GHOSTVALUE_AT(GHOST_DEFLATE_BYTECODE_INDEX), (const char*)DEFLATEDATA_DEFLATE_BYTECODE, DEFLATE_BYTECODE_LEN );
+
+ tsk_safeobj_unlock(deflatedata);
+
+#undef GHOSTVALUE_AT
+}
+
+/**Acknowledge a Ghost state.
+*/
+void tcomp_deflatedata_ackGhost(tcomp_compressordata_t *data, const tcomp_buffer_handle_t *stateid)
+{
+ tcomp_deflatedata_t *deflatedata = data;
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return;
+ }
+
+ tsk_safeobj_lock(deflatedata);
+
+#if USE_ONLY_ACKED_STATES
+ if(deflatedata->ghostState){
+ /* Update ghost */
+ if(tcomp_buffer_startsWith(deflatedata->ghostState->identifier, stateid)){
+ /* END() + COPY() */
+ tcomp_deflateStream_end(&(deflatedata->stream_acked));
+ tcomp_deflateStream_copy(&(deflatedata->stream_acked), &(deflatedata->stream_1));
+ deflatedata->stream_acked.stateful = 1;
+ deflatedata->stream_acked.dataWaitingAck = 0;
+ }
+ }
+#endif
+
+ tsk_safeobj_unlock(deflatedata);
+}
+
+/**Updates a Ghost state.
+*/
+void tcomp_deflatedata_updateGhost(tcomp_deflatedata_t *deflatedata, const uint8_t *input_ptr, tsk_size_t input_size)
+{
+ uint32_t i;
+ uint8_t *ghostvalue_ptr = 0;
+
+#define GHOSTVALUE_AT(position) (ghostvalue_ptr + position)
+
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return;
+ }
+
+ if(!deflatedata->ghostState){
+ TSK_DEBUG_ERROR("NULL ghost state.");
+ return;
+ }
+
+ tsk_safeobj_lock(deflatedata);
+
+ ghostvalue_ptr = tcomp_buffer_getBuffer(deflatedata->ghostState->value);
+
+#define ZBUFF_LEN (0x0001 << deflatedata->zWindowBits)
+ for(i = 0; i < input_size; i++){
+#if 0
+ *GHOSTVALUE_AT(GHOST_INPUT_INDEX + ghost_copy_offset) = 0x00;
+#else
+ *GHOSTVALUE_AT(GHOST_INPUT_INDEX + deflatedata->ghost_copy_offset) = input_ptr[i];
+#endif
+ deflatedata->ghost_copy_offset = (deflatedata->ghost_copy_offset + 1) % ZBUFF_LEN;
+ }
+
+ /* Update Circular Buffer Index */
+ TSK_BINARY_SET_2BYTES( GHOSTVALUE_AT(GHOST_CB_END_INDEX), (DEFLATE_UDVM_CIRCULAR_START_INDEX + deflatedata->ghost_copy_offset) );
+
+ /* Compute State Identifier (20 bytes) */
+ tcomp_state_makeValid(deflatedata->ghostState);
+
+ /*printf("GHOST\n");
+ tcomp_buffer_nprint(deflatedata->ghostState->value);
+ tcomp_buffer_nprint(deflatedata->ghostState->identifier);*/
+
+ tsk_safeobj_unlock(deflatedata);
+
+#undef GHOSTVALUE_AT
+}
+
+
+uint32_t* tcomp_deflatedata_getGhostCopyOffset(tcomp_deflatedata_t *deflatedata)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return 0;
+ }
+
+ return &(deflatedata->ghost_copy_offset);
+}
+
+void tcomp_deflatedata_freeGhostState(tcomp_compressordata_t *data)
+{
+ tcomp_deflatedata_t *deflatedata = data;
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return;
+ }
+
+ TSK_OBJECT_SAFE_FREE(deflatedata->ghostState);
+}
diff --git a/tinySIGCOMP/src/tcomp_deflatedata.h b/tinySIGCOMP/src/tcomp_deflatedata.h
new file mode 100644
index 0000000..b220635
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_deflatedata.h
@@ -0,0 +1,172 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief SigComp Deflate compressor(Compressor data).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_COMPRESSORDEFLATE_DATA_H
+#define TCOMP_COMPRESSORDEFLATE_DATA_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_params.h"
+#include "tcomp_state.h"
+#include "tcomp_compressordata.h"
+
+#if HAS_ZLIB
+# include <zlib.h>
+#else
+# include "zlib.h"
+#endif
+
+TCOMP_BEGIN_DECLS
+
+//============================================================//
+#define USE_DICTS_FOR_COMPRESSION 0
+
+#define Z_DEFAULT_WINDOW_BITS 10 /* 1024*/
+
+
+#define DEFLATE_DECOMPRESSION_PTR_INDEX 70
+#if USE_DICTS_FOR_COMPRESSION
+# define DEFLATE_UDVM_CIRCULAR_START_INDEX 701
+#else
+# define DEFLATE_UDVM_CIRCULAR_START_INDEX 630
+#endif
+
+
+#define DEFLATE_SIP_DICT_ONLY 0x00
+#define DEFLATE_PRES_DICT_ONLY 0x01
+#define DEFLATE_SIP_PRES_DICTS 0x02
+#define DEFLATE_NO_DICT 0x03
+#define DEFLATE_FIXME_DICT DEFLATE_NO_DICT
+
+
+
+#define DEFLATE_BYTECODE_DESTINATION_START 320
+#define DEFLATE_BYTECODE_DESTINATION_CODE 0x04 // 320
+#if USE_DICTS_FOR_COMPRESSION
+# define DEFLATE_BYTECODE_LEN 381
+#else
+# define DEFLATE_BYTECODE_LEN 310
+#endif
+//==========================================================//
+
+
+#if USE_DICTS_FOR_COMPRESSION
+#define DEFLATEDATA_DEFLATE_BYTECODE \
+ "\x0f\x86\x7a\xa2\xbd\x8d\x05\xa2\xbd\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00" \
+ "\x09\x00\x0a\x01\x0b\x01\x0d\x01\x0f\x01\x11\x02\x13\x02\x17\x02\x1b\x02\x1f\x03\x23\x03" \
+ "\x2b\x03\x33\x03\x3b\x04\xa0\x43\x04\xa0\x53\x04\xa0\x63\x04\xa0\x73\x05\xa0\x83\x05\xa0" \
+ "\xa3\x05\xa0\xc3\x05\xa0\xe3\x00\xa1\x02\x00\x01\x00\x02\x00\x03\x00\x04\x01\x05\x01\x07" \
+ "\x02\x09\x02\x0d\x03\x11\x03\x19\x04\x21\x04\x31\x05\xa0\x41\x05\xa0\x61\x06\xa0\x81\x06" \
+ "\xa0\xc1\x07\xa1\x01\x07\xa1\x81\x08\xa2\x01\x08\xa3\x01\x09\xa4\x01\x09\xa6\x01\x0a\xa8" \
+ "\x01\x0a\xac\x01\x0b\xb0\x01\x0b\xb8\x01\x0c\x80\x20\x01\x0c\x80\x30\x01\x0d\x80\x40\x01" \
+ "\x0d\x80\x60\x01\x1c\x08\xa1\x34\xa0\xde\x0e\xa0\x42\xc1\x36\x06\x21\x86\x1a\x04\xc1\x3a" \
+ "\xa0\x0c\xa0\x1e\xa0\x30\xa0\x47\x0f\xa1\x3a\x04\xa6\xfb\x80\xe5\x07\x80\xdf\xe5\x80\xe6" \
+ "\x00\x16\xa0\x2c\x0f\xa1\x3a\x04\xa6\xd9\x80\x42\x29\x80\x7d\x0b\x80\xb3\x00\x16\xa0\x1a" \
+ "\x0f\xa1\x3a\x07\xa6\xfb\x80\xe5\x07\x80\xdf\xe5\x80\xe6\x06\x80\xd9\x42\x80\x29\x7d\xab" \
+ "\xb3\x1d\x03\x22\xa0\x89\x1e\x20\xa0\x68\x04\x07\x00\x17\x80\x40\x11\x01\x30\xa0\xbf\x00" \
+ "\x00\xa0\xc0\xa0\xc7\x80\x40\x29\x01\xa1\x90\xa1\xff\xa0\x90\x17\x50\x80\x40\x11\xa0\x0b" \
+ "\xa0\x49\xa0\x15\x22\x21\x01\x13\x21\x01\x23\x16\x9f\xcf\x08\x10\x04\x12\x50\x04\x22\x1d" \
+ "\x51\x22\xa0\x49\x06\x12\x51\x1e\x20\xa0\x41\x01\x05\x00\x1f\x2f\x08\x10\x04\x12\x50\x04" \
+ "\x26\x1d\x53\x26\xa0\x31\x06\x14\x53\x0e\x20\x63\x14\x54\x52\x23\x22\x50\x52\x16\x9f\x9b" \
+ "\x0e\x2a\xa4\x86\x0f\x38\x04\xc1\x36\x86\xa1\xec\x06\x0d\x38\xc1\x34\x2c\x23\x2a\xa1\x38" \
+ "\xc1\x36\x86\xa1\xec\x06\x00"
+#else
+#define DEFLATEDATA_DEFLATE_BYTECODE \
+ "\x0f\x86\x7a\xa2\x76\x8d\x05\xa2\x76\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00" \
+ "\x09\x00\x0a\x01\x0b\x01\x0d\x01\x0f\x01\x11\x02\x13\x02\x17\x02\x1b\x02\x1f\x03\x23\x03" \
+ "\x2b\x03\x33\x03\x3b\x04\xa0\x43\x04\xa0\x53\x04\xa0\x63\x04\xa0\x73\x05\xa0\x83\x05\xa0" \
+ "\xa3\x05\xa0\xc3\x05\xa0\xe3\x00\xa1\x02\x00\x01\x00\x02\x00\x03\x00\x04\x01\x05\x01\x07" \
+ "\x02\x09\x02\x0d\x03\x11\x03\x19\x04\x21\x04\x31\x05\xa0\x41\x05\xa0\x61\x06\xa0\x81\x06" \
+ "\xa0\xc1\x07\xa1\x01\x07\xa1\x81\x08\xa2\x01\x08\xa3\x01\x09\xa4\x01\x09\xa6\x01\x0a\xa8" \
+ "\x01\x0a\xac\x01\x0b\xb0\x01\x0b\xb8\x01\x0c\x80\x20\x01\x0c\x80\x30\x01\x0d\x80\x40\x01" \
+ "\x0d\x80\x60\x01\x1c\x06\xa1\x34\xa0\x97\x0e\xa0\x42\xc1\x36\x06\x21\x86\x1d\x03\x22\xa0" \
+ "\x89\x1e\x20\xa0\x68\x04\x07\x00\x17\x80\x40\x11\x01\x30\xa0\xbf\x00\x00\xa0\xc0\xa0\xc7" \
+ "\x80\x40\x29\x01\xa1\x90\xa1\xff\xa0\x90\x17\x50\x80\x40\x11\xa0\x0b\xa0\x49\xa0\x15\x22" \
+ "\x21\x01\x13\x21\x01\x23\x16\x9f\xcf\x08\x10\x04\x12\x50\x04\x22\x1d\x51\x22\xa0\x49\x06" \
+ "\x12\x51\x1e\x20\xa0\x41\x01\x05\x00\x1f\x2f\x08\x10\x04\x12\x50\x04\x26\x1d\x53\x26\xa0" \
+ "\x31\x06\x14\x53\x0e\x20\x63\x14\x54\x52\x23\x22\x50\x52\x16\x9f\x9b\x0e\x2a\xa4\x86\x0f" \
+ "\x38\x04\xc1\x36\x86\xa1\xec\x06\x0d\x38\xc1\x34\x2c\x23\x2a\xa1\x38\xc1\x36\x86\xa1\xec" \
+ "\x06\x00"
+
+#endif /* USE_DICTS_FOR_COMPRESSION */
+
+
+typedef struct tcomp_deflateStream_s
+{
+ z_stream zs;
+ unsigned dataWaitingAck:1;
+ unsigned stateful:1;
+}
+tcomp_deflateStream_t;
+
+tsk_bool_t tcomp_deflateStream_end(tcomp_deflateStream_t *stream);
+tsk_bool_t tcomp_deflateStream_copy(tcomp_deflateStream_t *stream, tcomp_deflateStream_t *source);
+
+
+typedef struct tcomp_deflatedata_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tcomp_deflateStream_t stream_1;
+ tcomp_deflateStream_t stream_acked;
+ int zLevel;
+ int zWindowBits;
+
+ unsigned initialized:1;
+
+ uint32_t ghost_copy_offset;
+ tcomp_state_t *ghostState;
+ unsigned stream:1;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_deflatedata_t;
+
+tcomp_deflatedata_t* tcomp_deflatedata_create(tsk_bool_t isStream);
+
+void tcomp_deflatedata_freeGhostState(tcomp_compressordata_t *deflatedata);
+void tcomp_deflatedata_ackGhost(tcomp_compressordata_t *deflatedata, const tcomp_buffer_handle_t *stateid);
+void tcomp_deflatedata_createGhost(tcomp_deflatedata_t *deflatedata, uint16_t state_len, tcomp_params_t *params);
+void tcomp_deflatedata_updateGhost(tcomp_deflatedata_t *deflatedata, const uint8_t *input_ptr, tsk_size_t input_size);
+uint32_t* tcomp_deflatedata_getGhostCopyOffset(tcomp_deflatedata_t *deflatedata);
+
+tsk_bool_t tcomp_deflatedata_zReset(tcomp_deflatedata_t *deflatedata);
+tsk_bool_t tcomp_deflatedata_zCompress(tcomp_deflatedata_t *deflatedata, const void* in, tsk_size_t inLen, void* out, tsk_size_t* outLen, tsk_bool_t *stateChanged);
+
+int tcomp_deflatedata_zGetWindowBits(tcomp_deflatedata_t *deflatedata);
+void tcomp_deflatedata_zSetWindowBits(tcomp_deflatedata_t *deflatedata, int windowSize);
+
+tsk_bool_t tcomp_deflatedata_isStateful(tcomp_deflatedata_t *deflatedata);
+tsk_bool_t tcomp_deflatedata_zInit(tcomp_deflatedata_t *deflatedata);
+tsk_bool_t tcomp_deflatedata_zUnInit(tcomp_deflatedata_t *deflatedata);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_deflatedata_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_COMPRESSORDEFLATE_DATA_H */
diff --git a/tinySIGCOMP/src/tcomp_deflatedata.zlib.c b/tinySIGCOMP/src/tcomp_deflatedata.zlib.c
new file mode 100644
index 0000000..686f770
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_deflatedata.zlib.c
@@ -0,0 +1,216 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_compressor.h
+ * @brief SiComp Deflate compressor (zlib).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_deflatedata.h"
+#include "tsk_debug.h"
+
+
+tsk_bool_t tcomp_deflateStream_end(tcomp_deflateStream_t *stream)
+{
+ if(!stream){
+ TSK_DEBUG_ERROR("NULL defalte stream.");
+ return tsk_false;
+ }
+
+ return deflateEnd(&(stream->zs));
+}
+
+tsk_bool_t tcomp_deflateStream_copy(tcomp_deflateStream_t *stream, tcomp_deflateStream_t *source)
+{
+ if(!stream){
+ TSK_DEBUG_ERROR("NULL defalte stream.");
+ return tsk_false;
+ }
+
+ return deflateCopy(&(stream->zs), &(source->zs));
+}
+
+tsk_bool_t tcomp_deflatedata_zInit(tcomp_deflatedata_t *deflatedata)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return tsk_false;
+ }
+
+ /* Already initialized? */
+ if(deflatedata->initialized) {
+ return tsk_true;
+ }
+
+ /* allocate deflate state */
+ deflatedata->stream_1.zs.zalloc = deflatedata->stream_acked.zs.zalloc = Z_NULL;
+ deflatedata->stream_1.zs.zfree = deflatedata->stream_acked.zs.zfree = Z_NULL;
+ deflatedata->stream_1.zs.opaque = deflatedata->stream_acked.zs.opaque = Z_NULL;
+#ifndef __SYMBIAN32__
+ deflatedata->stream_1.zs.data_type = deflatedata->stream_acked.zs.data_type = Z_TEXT;
+#endif
+
+ //bool ret = (deflateInit(&this->zStream, this->zLevel) == Z_OK);
+ if( deflateInit2(&deflatedata->stream_1.zs, deflatedata->zLevel, Z_DEFLATED, -deflatedata->zWindowBits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK
+ || deflateInit2(&deflatedata->stream_acked.zs, deflatedata->zLevel, Z_DEFLATED, -deflatedata->zWindowBits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK )
+ {
+ return tsk_false;
+ }
+#if USE_DICTS_FOR_COMPRESSION
+ if( deflateSetDictionary(this->stream_1.zs, (const Bytef*)RFC3485_DICTIONARY_SIP_VALUE, RFC3485_DICTIONARY_SIP_VALUE_LENGTH) != Z_OK
+ || deflateSetDictionary(this->stream_acked.zs, (const Bytef*)RFC3485_DICTIONARY_SIP_VALUE, RFC3485_DICTIONARY_SIP_VALUE_LENGTH) != Z_OK )
+ {
+ return false;
+ }
+#endif
+
+ deflatedata->stream_1.stateful = deflatedata->stream_acked.stateful = 0;
+ deflatedata->stream_1.dataWaitingAck = deflatedata->stream_acked.dataWaitingAck = 0;
+ deflatedata->initialized = 1;
+
+ return tsk_true;
+}
+
+tsk_bool_t tcomp_deflatedata_zUnInit(tcomp_deflatedata_t *deflatedata)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return tsk_false;
+ }
+
+ if(deflatedata->initialized){
+ deflatedata->initialized = 0;
+
+ deflatedata->stream_1.dataWaitingAck = deflatedata->stream_acked.dataWaitingAck = 0;
+ deflatedata->stream_1.stateful = deflatedata->stream_acked.stateful = 0;
+
+ return (tcomp_deflateStream_end(&deflatedata->stream_1) != Z_STREAM_ERROR) && (tcomp_deflateStream_end(&deflatedata->stream_acked) != Z_STREAM_ERROR);
+ }
+ return tsk_true;
+}
+
+tsk_bool_t tcomp_deflatedata_zReset(tcomp_deflatedata_t *deflatedata)
+{
+ tsk_bool_t ret;
+
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return tsk_false;
+ }
+
+ ret = deflatedata->initialized ? tcomp_deflatedata_zUnInit(deflatedata) : tsk_true;
+ ret &= tcomp_deflatedata_zInit(deflatedata);
+
+ return ret;
+}
+
+tsk_bool_t tcomp_deflatedata_zCompress(tcomp_deflatedata_t *deflatedata, const void* in, tsk_size_t inLen, void* out, tsk_size_t* outLen, tsk_bool_t *stateChanged)
+{
+ int ret = tsk_false;
+/*
+ Two streams [1] and [2]
+
+ * ZINIT/ZUNINIT/ZRESET
+ XXX([1])
+ XXX([2])
+
+ * COMPRESSION
+ [1]->END()
+ [1]<-COPY-[2]
+ [1]->COMPRESS()
+
+ * ACK
+ [2]->END()
+ [2]<-COPY-[1]
+ updateGhost([1])
+*/
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return tsk_false;
+ }
+
+ tsk_safeobj_lock(deflatedata);
+
+ /* Initialized? */
+ if(!deflatedata->initialized){
+ if(!tcomp_deflatedata_zInit(deflatedata)){
+ TSK_DEBUG_ERROR("Failed to initialize zlib resources..");
+ tsk_safeobj_unlock(deflatedata);
+ return tsk_false;
+ }
+ }
+
+#if USE_ONLY_ACKED_STATES
+ if(!deflatedata->stream_acked.dataWaitingAck){
+ deflatedata->stream_acked.dataWaitingAck = 1;
+ *stateChanged = tsk_true;
+ }
+ else{
+ *stateChanged = tsk_false;
+ }
+
+ /* END() + COPY() ==> use acked state */
+ tcomp_deflateStream_end(&(deflatedata->stream_1));
+ tcomp_deflateStream_copy(&(deflatedata->stream_1), &(deflatedata->stream_acked));
+
+#else
+ *stateChanged = tsk_true;
+#endif
+
+ // IN
+ deflatedata->stream_1.zs.next_in = (Bytef*)in;
+ deflatedata->stream_1.zs.avail_in = (uInt)inLen;
+
+ // OUT
+ deflatedata->stream_1.zs.next_out = (Bytef*)out;
+ deflatedata->stream_1.zs.avail_out = (uInt)*outLen;
+
+ ret = deflate(&(deflatedata->stream_1.zs), Z_SYNC_FLUSH);
+
+ *outLen -= deflatedata->stream_1.zs.avail_out;
+
+ tsk_safeobj_unlock(deflatedata);
+
+ return (ret == Z_OK);
+}
+
+int tcomp_deflatedata_zGetWindowBits(tcomp_deflatedata_t *deflatedata)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return 0;
+ }
+
+ return deflatedata->zWindowBits;
+}
+
+void tcomp_deflatedata_zSetWindowBits(tcomp_deflatedata_t *deflatedata, int windowSize)
+{
+ if(!deflatedata){
+ TSK_DEBUG_ERROR("NULL defalte data.");
+ return;
+ }
+
+ deflatedata->zWindowBits = windowSize;
+}
diff --git a/tinySIGCOMP/src/tcomp_dicts.c b/tinySIGCOMP/src/tcomp_dicts.c
new file mode 100644
index 0000000..ede9efe
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_dicts.c
@@ -0,0 +1,100 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_dicts.c
+ * @brief SigComp Dictionaries
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_dicts.h"
+#include "tcomp_buffer.h"
+
+#include "tcomp_rfc3485_dictionary_sip.h"
+#include "tcomp_rfc5112_dictionary_presence.h"
+
+#include "tsk_debug.h"
+
+/**Presence-Specific Static Dictionary for Signaling Compression as per RFC 5112.
+*/
+tcomp_dictionary_t* tcomp_dicts_create_presence_dict()
+{
+ static const char *pres_dict_data = RFC5112_DICTIONARY_PRESENCE_VALUE;
+ static tcomp_dictionary_t * pres_dict = tsk_null;
+
+ if(!pres_dict)
+ {
+ pres_dict = tcomp_state_create(
+ RFC5112_DICTIONARY_PRESENCE_VALUE_LENGTH,
+ RFC5112_DICTIONARY_PRESENCE_STATE_ADDRESS,
+ RFC5112_DICTIONARY_PRESENCE_STATE_INSTRUCTION,
+ RFC5112_DICTIONARY_PRESENCE_MINIMUM_ACCESS_LENGTH,
+ 65535);
+
+ if(pres_dict){
+ tcomp_buffer_referenceBuff(pres_dict->value, (uint8_t*)pres_dict_data, RFC5112_DICTIONARY_PRESENCE_VALUE_LENGTH);
+ tcomp_state_makeValid(pres_dict);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create Presence dictionary.");
+ }
+ }
+ else{
+ pres_dict = tsk_object_ref(pres_dict);
+ }
+
+ return pres_dict;
+}
+
+/**The Session Initiation Protocol (SIP) and Session Description Protocol (SDP) Static Dictionary for Signaling Compression as per RFC 3485.
+*/
+tcomp_dictionary_t* tcomp_dicts_create_sip_dict()
+{
+
+ static const char *sip_dict_data = RFC3485_DICTIONARY_SIP_VALUE;
+ static tcomp_dictionary_t *sip_dict = tsk_null;
+
+ if(!sip_dict){
+ sip_dict = tcomp_state_create(
+ RFC3485_DICTIONARY_SIP_VALUE_LENGTH,
+ RFC3485_DICTIONARY_SIP_STATE_ADDRESS,
+ RFC3485_DICTIONARY_SIP_STATE_INSTRUCTION,
+ RFC3485_DICTIONARY_SIP_MINIMUM_ACCESS_LENGTH,
+ 65535);
+
+ if(sip_dict){
+ tcomp_buffer_referenceBuff(sip_dict->value, (uint8_t*)sip_dict_data, RFC3485_DICTIONARY_SIP_VALUE_LENGTH);
+ tcomp_state_makeValid(sip_dict);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create SIP/SDP dictionary.");
+ }
+ }
+ else{
+ /* take ownership */
+ sip_dict = tsk_object_ref(sip_dict);
+ }
+
+ return sip_dict;
+}
+
diff --git a/tinySIGCOMP/src/tcomp_dicts.h b/tinySIGCOMP/src/tcomp_dicts.h
new file mode 100644
index 0000000..42db313
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_dicts.h
@@ -0,0 +1,44 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_dicts.h
+ * @brief SigComp Dictionaries
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSIGCOMP_DICTS_H_
+#define _TINYSIGCOMP_DICTS_H_
+
+#include "tinysigcomp_config.h"
+#include "tcomp_state.h"
+
+TCOMP_BEGIN_DECLS
+
+extern tcomp_dictionary_t* tcomp_dicts_create_presence_dict();
+extern tcomp_dictionary_t* tcomp_dicts_create_sip_dict();
+
+TCOMP_END_DECLS
+
+#endif /* _TINYSIGCOMP_DICTS_H_ */
diff --git a/tinySIGCOMP/src/tcomp_headers_index.h b/tinySIGCOMP/src/tcomp_headers_index.h
new file mode 100644
index 0000000..17f414c
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_headers_index.h
@@ -0,0 +1,83 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_headers_index.h
+ * @brief SigComp headers index.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef TCOMP_UDVM_HEADERS_INDEX_H
+#define TCOMP_UDVM_HEADERS_INDEX_H
+
+/*
+ 0 7 8 15
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | UDVM_memory_size | 0 - 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | cycles_per_bit | 2 - 3
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SigComp_version | 4 - 5
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | partial_state_ID_length | 6 - 7
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | state_length | 8 - 9
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ : reserved : 10 - 31
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+#define TCOMP_UDVM_HEADER_UDVM_MEMORY_SIZE_INDEX 0
+#define TCOMP_UDVM_HEADER_CYCLES_PER_BIT_INDEX 2
+#define TCOMP_UDVM_HEADER_SIGCOMP_VERSION_INDEX 4
+#define TCOMP_UDVM_HEADER_PARTIAL_STATE_ID_LENGTH_INDEX 6
+#define TCOMP_UDVM_HEADER_STATE_LENGTH_INDEX 8
+#define TCOMP_UDVM_HEADER_RESERVED_INDEX 10
+
+
+/*
+0 7 8 15
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| byte_copy_left | 64 - 65
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| byte_copy_right | 66 - 67
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| input_bit_order | 68 - 69
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| stack_location | 70 - 71
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+0 7 8 15
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| reserved |F|H|P| 68 - 69
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+*/
+#define TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX 64
+#define TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX 66
+#define TCOMP_UDVM_HEADER_INPUT_BIT_ORDER_INDEX 68
+#define TCOMP_UDVM_HEADER_STACK_LOCATION_INDEX 70
+
+#endif /* TCOMP_UDVM_HEADERS_INDEX_H */
diff --git a/tinySIGCOMP/src/tcomp_instructions.h b/tinySIGCOMP/src/tcomp_instructions.h
new file mode 100644
index 0000000..9750b50
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_instructions.h
@@ -0,0 +1,74 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_instructions.h
+ * @brief List of all supported UDVM instructions as per RFC 3320 subclause 9.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef TCOMP_INSTRUCTIONS_H
+#define TCOMP_INSTRUCTIONS_H
+
+/************************************************************************************
+* Instruction Bytecode value Cost in UDVM cycles *
+*************************************************************************************/
+#define TCOMP_UDVM_INST__DECOMPRESSION_FAILURE 0 //1
+#define TCOMP_UDVM_INST__AND 1 //1
+#define TCOMP_UDVM_INST__OR 2 //1
+#define TCOMP_UDVM_INST__NOT 3 //1
+#define TCOMP_UDVM_INST__LSHIFT 4 //1
+#define TCOMP_UDVM_INST__RSHIFT 5 //1
+#define TCOMP_UDVM_INST__ADD 6 //1
+#define TCOMP_UDVM_INST__SUBTRACT 7 //1
+#define TCOMP_UDVM_INST__MULTIPLY 8 //1
+#define TCOMP_UDVM_INST__DIVIDE 9 //1
+#define TCOMP_UDVM_INST__REMAINDER 10 //1
+#define TCOMP_UDVM_INST__SORT_ASCENDING 11 //1 + k * (ceiling(log2(k)) + n)
+#define TCOMP_UDVM_INST__SORT_DESCENDING 12 //1 + k * (ceiling(log2(k)) + n)
+#define TCOMP_UDVM_INST__SHA_1 13 //1 + length
+#define TCOMP_UDVM_INST__LOAD 14 //1
+#define TCOMP_UDVM_INST__MULTILOAD 15 //1 + n
+#define TCOMP_UDVM_INST__PUSH 16 //1
+#define TCOMP_UDVM_INST__POP 17 //1
+#define TCOMP_UDVM_INST__COPY 18 //1 + length
+#define TCOMP_UDVM_INST__COPY_LITERAL 19 //1 + length
+#define TCOMP_UDVM_INST__COPY_OFFSET 20 //1 + length
+#define TCOMP_UDVM_INST__MEMSET 21 //1 + length
+#define TCOMP_UDVM_INST__JUMP 22 //1
+#define TCOMP_UDVM_INST__COMPARE 23 //1
+#define TCOMP_UDVM_INST__CALL 24 //1
+#define TCOMP_UDVM_INST__RETURN 25 //1
+#define TCOMP_UDVM_INST__SWITCH 26 //1 + n
+#define TCOMP_UDVM_INST__CRC 27 //1 + length
+#define TCOMP_UDVM_INST__INPUT_BYTES 28 //1 + length
+#define TCOMP_UDVM_INST__INPUT_BITS 29 //1
+#define TCOMP_UDVM_INST__INPUT_HUFFMAN 30 //1 + n
+#define TCOMP_UDVM_INST__STATE_ACCESS 31 //1 + state_length
+#define TCOMP_UDVM_INST__STATE_CREATE 32 //1 + state_length
+#define TCOMP_UDVM_INST__STATE_FREE 33 //1
+#define TCOMP_UDVM_INST__OUTPUT 34 //1 + output_length
+#define TCOMP_UDVM_INST__END_MESSAGE 35 //1 + state_length
+
+#endif /* TCOMP_INSTRUCTIONS_H */
diff --git a/tinySIGCOMP/src/tcomp_manager.c b/tinySIGCOMP/src/tcomp_manager.c
new file mode 100644
index 0000000..6b11f95
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_manager.c
@@ -0,0 +1,364 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_manager.c
+ * @brief SigComp Manager.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_manager.h"
+#include "tsk_debug.h"
+
+#include "tcomp_compressordisp.h"
+#include "tcomp_decompressordisp.h"
+#include "tcomp_statehandler.h"
+
+#include "tsk_object.h"
+#include "tsk_safeobj.h"
+
+#define MAX_DMS 131072
+#define MAX_SMS 131072
+#define MAX_CPB 128
+
+/**@defgroup tcomp_manager_group SigComp manager.
+*/
+
+/**SigComp manager.
+*/
+typedef struct tcomp_manager_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tcomp_compressordisp_t *dispatcher_compressor;
+ tcomp_decompressordisp_t *dispatcher_decompressor;
+ tcomp_statehandler_t *stateHandler;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_manager_t;
+
+
+/**Creates new SigComp manager.
+*/
+tcomp_manager_handle_t* tcomp_manager_create()
+{
+ return tsk_object_new(tcomp_manager_def_t);
+}
+
+/**@ingroup tcomp_manager_group
+*/
+tsk_size_t tcomp_manager_compress(tcomp_manager_handle_t *handle, const void* compartmentId, tsk_size_t compartmentIdSize, const void* input_ptr, tsk_size_t input_size, void* output_ptr, tsk_size_t output_size, tsk_bool_t stream)
+{
+ tcomp_manager_t *manager = handle;
+ tsk_size_t ret_size = output_size;
+
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ if(tcomp_compressordisp_compress(manager->dispatcher_compressor, tcomp_buffer_createHash(compartmentId, compartmentIdSize),
+ input_ptr, input_size, output_ptr, &ret_size, stream))
+ {
+ return ret_size;
+ }
+
+ return 0;
+}
+
+/**@ingroup tcomp_manager_group
+*/
+tsk_size_t tcomp_manager_decompress(tcomp_manager_handle_t *handle, const void* input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)
+{
+ tcomp_manager_t *manager = handle;
+
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ if(!lpResult || !lpResult->output_buffer){
+ TSK_DEBUG_ERROR("You MUST initialize the sigcomp result and set a valid output buffer.");
+ return 0;
+ }
+
+ /* Reset previous values */
+ tcomp_result_reset(lpResult);
+
+ if(tcomp_decompressordisp_decompress(manager->dispatcher_decompressor, input_ptr, input_size, lpResult)){
+ return *tcomp_buffer_getIndexBytes(lpResult->output_buffer);
+ }
+
+ return 0;
+}
+
+/**@ingroup tcomp_manager_group
+*/
+tsk_size_t tcomp_manager_getNextStreamMessage(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ if(!lpResult || !tcomp_buffer_getSize(lpResult->output_buffer)){
+ TSK_DEBUG_ERROR("Invalid result.");
+ return 0;
+ }
+
+ if(!lpResult->isStreamBased){
+ TSK_DEBUG_ERROR("You MUST provide stream buffer.");
+ return 0;
+ }
+
+ _tcomp_result_reset(lpResult, tsk_false, tsk_false);
+
+ if(tcomp_decompressordisp_getNextMessage(manager->dispatcher_decompressor, lpResult)){
+ return *tcomp_buffer_getIndexBytes(lpResult->output_buffer);
+ }
+
+ return 0;
+}
+
+/**@ingroup tcomp_manager_group
+*/
+void tcomp_manager_provideCompartmentId(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ tcomp_statehandler_handleResult(manager->stateHandler, &lpResult);
+}
+
+/**@ingroup tcomp_manager_group
+*/
+void tcomp_manager_closeCompartment(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ tcomp_statehandler_deleteCompartment(manager->stateHandler, tcomp_buffer_createHash(compartmentId, compartmentIdSize));
+}
+
+/**@ingroup tcomp_manager_group
+* Sets the decompression memory size (RFC 3320 section 3.3).
+* @param handle The SigComp manager.
+* @param dms The new decompression memory size value.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_setDecompression_Memory_Size(tcomp_manager_handle_t *handle, uint32_t dms)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_params_setDmsValue(manager->stateHandler->sigcomp_parameters, (dms > MAX_DMS ? MAX_DMS : dms));
+}
+
+/**@ingroup tcomp_manager_group
+* Sets the state memory size (RFC 3320 section 3.3).
+* @param handle The SigComp manager.
+* @param sms The new state memory size value.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_setState_Memory_Size(tcomp_manager_handle_t *handle, uint32_t sms)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_params_setSmsValue(manager->stateHandler->sigcomp_parameters, (sms > MAX_SMS ? MAX_SMS : sms));
+}
+
+/**@ingroup tcomp_manager_group
+* Sets the Cycle Per Bit (RFC 3320 section 3.3).
+* @param handle The SigComp manager.
+* @param cpb The new cycle per bit value.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_setCycles_Per_Bit(tcomp_manager_handle_t *handle, uint8_t cpb)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_params_setCpbValue(manager->stateHandler->sigcomp_parameters, (cpb > MAX_CPB ? MAX_CPB : cpb));
+}
+
+/**@ingroup tcomp_manager_group
+* Sets the SigComp version (RFC 3320 section 3.3).
+* @param handle The SigComp manager.
+* @param version The SigComp version. Only 2.0 is supported.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_setSigComp_Version(tcomp_manager_handle_t *handle, uint8_t version)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ manager->stateHandler->sigcomp_parameters->SigComp_version = version;
+ return 0;
+}
+
+/**@ingroup tcomp_manager_group
+* Adds a new compressor to the dispatcher.
+* @param handle The SigComp manager holding the dispatcher.
+* @param compressor The compressor to add.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_addCompressor(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_compressordisp_addCompressor(manager->dispatcher_compressor, compressor);
+}
+
+/**@ingroup tcomp_manager_group
+* Removes the compressor from the dispatcher.
+* @param handle The SigComp manager holding the dispatcher.
+* @param compressor The compressor to add.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tcomp_manager_removeCompressor(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_compressordisp_removeCompressor(manager->dispatcher_compressor, compressor);
+}
+
+/**@ingroup tcomp_manager_group
+* Adds SIP/SDP dictionary (RFC 3485) to the state handler.
+* @param handle The SigComp manager holding the state handler.
+* @retval Zero if succeed and non-zero otherwise.
+*/
+int tcomp_manager_addSipSdpDictionary(tcomp_manager_handle_t *handle)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_statehandler_addSipSdpDictionary(manager->stateHandler);
+}
+
+/**@ingroup tcomp_manager_group
+* Adds Presence dictionary (RFC 5112) to the state handler.
+* @param handle The SigComp manager holding the state handler.
+* @retval Zero if succeed and non-zero otherwise.
+*/
+int tcomp_manager_addPresenceDictionary(tcomp_manager_handle_t *handle)
+{
+ tcomp_manager_t *manager = handle;
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tcomp_statehandler_addPresenceDictionary(manager->stateHandler);
+}
+
+
+
+
+
+
+
+
+
+
+
+//========================================================
+// SigComp manager object definition
+//
+
+static void* tcomp_manager_ctor(void * self, va_list * app)
+{
+ tcomp_manager_t *manager = self;
+ if(manager)
+ {
+ manager->stateHandler = tcomp_statehandler_create();
+ manager->dispatcher_compressor = tcomp_compressordisp_create(manager->stateHandler);
+ manager->dispatcher_decompressor = tcomp_decompressordisp_create(manager->stateHandler);
+
+ /* Initialize safeobject */
+ tsk_safeobj_init(manager);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new manager.");
+ }
+
+ return self;
+}
+
+static void* tcomp_manager_dtor(void *self)
+{
+ tcomp_manager_t *manager = self;
+ if(manager){
+ TSK_OBJECT_SAFE_FREE(manager->stateHandler);
+ TSK_OBJECT_SAFE_FREE(manager->dispatcher_compressor);
+ TSK_OBJECT_SAFE_FREE(manager->dispatcher_decompressor);
+
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(manager);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null manager.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_manager_def_s =
+{
+ sizeof(tcomp_manager_t),
+ tcomp_manager_ctor,
+ tcomp_manager_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_manager_def_t = &tcomp_manager_def_s;
diff --git a/tinySIGCOMP/src/tcomp_manager.h b/tinySIGCOMP/src/tcomp_manager.h
new file mode 100644
index 0000000..5d70420
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_manager.h
@@ -0,0 +1,85 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_manager.h
+ * @brief SigComp Manager.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_MANAGER_H
+#define TCOMP_MANAGER_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_result.h"
+#include "tcomp_compressor.h"
+
+TCOMP_BEGIN_DECLS
+
+typedef void tcomp_manager_handle_t;
+
+TINYSIGCOMP_API tcomp_manager_handle_t* tcomp_manager_create();
+
+//
+// Compression / Decompression
+//
+TINYSIGCOMP_API tsk_size_t tcomp_manager_compress(tcomp_manager_handle_t *handle, const void* compartmentId, tsk_size_t compartmentIdSize, const void* input_ptr, tsk_size_t input_size, void* output_ptr, tsk_size_t output_size, tsk_bool_t stream);
+#define tcomp_manager_compressUDP(handle, compartmentId, compartmentIdSize, input_ptr, input_size, output_ptr, output_size) tcomp_manager_compress((tcomp_manager_handle_t *)handle, (const void*) compartmentId, (tsk_size_t) compartmentIdSize, (const void*) input_ptr, (tsk_size_t) input_size, (void*) output_ptr, (tsk_size_t) output_size, tsk_false)
+#define tcomp_manager_compressTCP(handle, compartmentId, compartmentIdSize, input_ptr, input_size, output_ptr, output_size) tcomp_manager_compress((tcomp_manager_handle_t *)handle, (const void*) compartmentId, (tsk_size_t) compartmentIdSize, (const void*) input_ptr, (tsk_size_t) input_size, (void*) output_ptr, (tsk_size_t) output_size, tsk_true)
+#define tcomp_manager_compressSCTP compressTCP
+
+TINYSIGCOMP_API tsk_size_t tcomp_manager_decompress(tcomp_manager_handle_t *handle, const void* input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult);
+TINYSIGCOMP_API tsk_size_t tcomp_manager_getNextStreamMessage(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult);
+
+/*
+* Compartment management
+*/
+TINYSIGCOMP_API void tcomp_manager_provideCompartmentId(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult);
+TINYSIGCOMP_API void tcomp_manager_closeCompartment(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize);
+
+/*
+* SigComp Parameters
+*/
+TINYSIGCOMP_API int tcomp_manager_setDecompression_Memory_Size(tcomp_manager_handle_t *handle, uint32_t dms);
+TINYSIGCOMP_API int tcomp_manager_setState_Memory_Size(tcomp_manager_handle_t *handle, uint32_t sms);
+TINYSIGCOMP_API int tcomp_manager_setCycles_Per_Bit(tcomp_manager_handle_t *handle, uint8_t cpb);
+TINYSIGCOMP_API int tcomp_manager_setSigComp_Version(tcomp_manager_handle_t *handle, uint8_t version);
+
+/*
+* Compressors
+*/
+TINYSIGCOMP_API int tcomp_manager_addCompressor(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor);
+TINYSIGCOMP_API int tcomp_manager_removeCompressor(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor);
+
+/*
+* Dictionnaries
+*/
+TINYSIGCOMP_API int tcomp_manager_addSipSdpDictionary(tcomp_manager_handle_t *handle);
+TINYSIGCOMP_API int tcomp_manager_addPresenceDictionary(tcomp_manager_handle_t *handle);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_manager_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_MANAGER_H */
diff --git a/tinySIGCOMP/src/tcomp_message.c b/tinySIGCOMP/src/tcomp_message.c
new file mode 100644
index 0000000..9272603
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_message.c
@@ -0,0 +1,360 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_message.c
+ * @brief SIGCOMP message as per RFC 3320 subclause 7.
+ * A message sent from the compressor dispatcher to the decompressordispatcher. In case of a message-based transport such as UDP, a
+ * SigComp message corresponds to exactly one datagram. For a stream-based transport such as TCP, the SigComp messages are
+ * separated by reserved delimiters.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_message.h"
+
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_binaryutils.h"
+#include "tsk_sha1.h"
+
+#include <string.h>
+
+#define MIN_LEN 2
+#define HEADER_GET_LEN(message) (message->headerSigComp & 0x03)
+#define HEADER_GET_T(message) (message->headerSigComp & 0x04)
+#define HEADER_IS_VALID(message) (message->headerSigComp >= 0xf8)
+
+#define HEADER_GET_DEST_VALUE(destination) ( sigcomp_encoding_destination[destination] )
+#define HEADER_GET_STATE_LENGTH(length) ( sigcomp_encoding_partial_id_length[length] )
+
+/** Creates new SigComp message.
+*/
+tcomp_message_t* tcomp_message_create(const void* input_ptr, tsk_size_t input_size, tsk_bool_t stream)
+{
+ return tsk_object_new(tcomp_message_def_t, input_ptr, input_size, stream);
+}
+
+/**Iniatizes the feedback item field.
+*/
+void initFeedbackItem(tcomp_message_t *message, uint8_t** start_ptr)
+{
+ /*
+ 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
+ | 0 | returned_feedback_field | | 1 | returned_feedback_length |
+ +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
+ | |
+ : returned_feedback_field :
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+ if((**start_ptr) <= 128){
+ tcomp_buffer_referenceBuff(message->ret_feedback_buffer, *start_ptr, 1);
+ *start_ptr++;
+ }
+ else{
+ tcomp_buffer_referenceBuff(message->ret_feedback_buffer, *start_ptr, 1+(**start_ptr&0x7f));
+ *start_ptr += tcomp_buffer_getSize(message->ret_feedback_buffer);
+ }
+
+ TSK_DEBUG_INFO("SigComp - Create feedback item.");
+}
+
+/**Initializes the state identifier field.
+*/
+void initStateId(tcomp_message_t *message, uint8_t** start_ptr, uint8_t state_len)
+{
+ tcomp_buffer_referenceBuff(message->stateId, *start_ptr, state_len);
+ *start_ptr += state_len;
+}
+
+/**Initializes a stateful SigComp message.
+*/
+void initStateful(tcomp_message_t *message, uint8_t** start_ptr, uint8_t* end_ptr)
+{
+ /*
+ +---+---+---+---+---+---+---+---+
+ | |
+ : partial state identifier :
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : remaining SigComp message :
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+ message->isOK &= (*start_ptr<=end_ptr);
+ if(message->isOK){
+ tcomp_buffer_referenceBuff(message->remaining_sigcomp_buffer, *start_ptr,
+ ((end_ptr-*start_ptr)));
+ }
+ TSK_DEBUG_INFO("SigComp - Creating stateful message.");
+}
+
+/**Initializes a stateless SigComp message.
+*/
+void initStateless(tcomp_message_t *message, uint8_t** start_ptr, uint8_t* end_ptr)
+{
+ int has_bytecode = (HEADER_GET_LEN(message) == 0); // No state ==> message contains udvm bytecode
+ message->isOK &= has_bytecode;
+ if(!message->isOK) return;
+
+ /*
+ +---+---+---+---+---+---+---+---+
+ | code_len |
+ +---+---+---+---+---+---+---+---+
+ | code_len | destination |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : uploaded UDVM bytecode :
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : remaining SigComp message :
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+ {
+ uint16_t code_len1, bytecodes_len;
+ uint8_t code_len2, destination, *bytecodes_uploaded_udvm, *remaining_SigComp_message;
+
+ uint8_t* dummy_ptr = ((uint8_t*)*start_ptr);
+
+ /* Code_len --> 12bits [8+4] */
+ code_len1 = *dummy_ptr; dummy_ptr++; /* skip first code_len 8bits */
+ code_len2 = (*dummy_ptr) & 0xf0; /* code_len 4 remaining bits */
+ destination = (*dummy_ptr) & 0x0f; /* 4bits after code_len */
+ dummy_ptr++; /* skip code_len 4bits + destination 4bits ==> 1-byte */
+
+ /* Get bytecodes length (12bits) */
+ bytecodes_len = ( (code_len1<<4)|(code_len2>>4) );
+
+ /* Starting memory address (code destination address). In UDVM. */
+ message->bytecodes_destination = HEADER_GET_DEST_VALUE(destination);
+ if((message->bytecodes_destination < 128) || (message->bytecodes_destination > 1024)){
+ message->isOK = 0;
+ return;
+ }
+
+ /* Uploaded UDVM pointer */
+ bytecodes_uploaded_udvm = dummy_ptr; /* SigComp header, feedback_item, code_len and destination have been skipped */
+
+ /* Skip uploaded udvm */
+ dummy_ptr += bytecodes_len;
+
+ /* remaining SigComp message */
+ remaining_SigComp_message = dummy_ptr;
+
+ /* check that remaining sigcomp message is valide */
+ if( !(message->isOK &= ( remaining_SigComp_message<=end_ptr )) ){
+ return;
+ }
+
+ //
+ // Setting buffers
+ //
+ tcomp_buffer_referenceBuff(message->uploaded_UDVM_buffer, bytecodes_uploaded_udvm, bytecodes_len);
+ tcomp_buffer_referenceBuff(message->remaining_sigcomp_buffer, remaining_SigComp_message, ((end_ptr-remaining_SigComp_message)));
+ }
+
+ TSK_DEBUG_INFO("SigComp - Creating stateless message.");
+}
+
+/**Initializes a NACK message as per RFC 4077.
+*/
+void initNack(tcomp_message_t *message, uint8_t** start_ptr, uint8_t* end_ptr)
+{
+ /*
+ +---+---+---+---+---+---+---+---+
+ | code_len = 0 |
+ +---+---+---+---+---+---+---+---+
+ | code_len = 0 | version = 1 |
+ +---+---+---+---+---+---+---+---+
+ | Reason Code |
+ +---+---+---+---+---+---+---+---+
+ | OPCODE of failed instruction |
+ +---+---+---+---+---+---+---+---+
+ | PC of failed instruction |
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : SHA-1 Hash of failed message :
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : Error Details :
+ | |
+ +---+---+---+---+---+---+---+---+*/
+
+ uint8_t* dummy_ptr;
+ message->isNack = 1;
+ if( (end_ptr-*start_ptr)<25 ){
+ message->isOK = 0;
+ return;
+ }
+
+ dummy_ptr = ((uint8_t*)*start_ptr);
+ dummy_ptr++; /* skip first code_len byte */
+ if(!(message->isOK = (*dummy_ptr++ == NACK_VERSION))) {
+ return;
+ }
+
+ if(!message->nack_info){
+ message->nack_info = tcomp_nackinfo_create();
+ }
+
+ message->nack_info->reasonCode = *dummy_ptr++;
+ message->nack_info->opcode = *dummy_ptr++;
+ message->nack_info->pc = TSK_BINARY_GET_2BYTES(dummy_ptr); dummy_ptr+=2;
+ memcpy(message->nack_info->sha1, dummy_ptr, TSK_SHA1_DIGEST_SIZE); dummy_ptr += TSK_SHA1_DIGEST_SIZE;
+ if(dummy_ptr < end_ptr){
+ /* Has error details */
+ tcomp_buffer_appendBuff(message->nack_info->details, dummy_ptr, (end_ptr-dummy_ptr));
+ }
+
+ TSK_DEBUG_INFO("SigComp - Initializing NACK message.");
+}
+
+
+
+
+
+//========================================================
+// SigComp message object definition
+//
+
+static tsk_object_t* tcomp_message_ctor(tsk_object_t *self, va_list * app)
+{
+ tcomp_message_t *message = self;
+
+ if(message){
+ const void* input_ptr = va_arg(*app, const void*);
+ tsk_size_t input_size = va_arg(*app, tsk_size_t);
+ tsk_bool_t stream = va_arg(*app, tsk_bool_t);
+
+ uint8_t *dummy_ptr, *end_ptr;
+ uint8_t state_len;
+
+ if(input_size < MIN_LEN){
+ TSK_DEBUG_ERROR("SigComp Message too short.");
+ message->isOK = 0;
+ goto bail;
+ }
+
+ message->stateId = tcomp_buffer_create_null();
+ message->remaining_sigcomp_buffer = tcomp_buffer_create_null();
+ message->uploaded_UDVM_buffer = tcomp_buffer_create_null();
+ message->ret_feedback_buffer= tcomp_buffer_create_null();
+
+ message->isNack = 0;
+ dummy_ptr = ((uint8_t*)input_ptr);
+ end_ptr = (dummy_ptr + input_size);
+
+ //
+ message->totalSize = input_size;
+ message->stream_based = stream;
+ message->bytecodes_destination = 0;
+
+ /* Get sigcomp header */
+ message->headerSigComp = *dummy_ptr;
+ dummy_ptr++;
+
+ /* Check message validity --> magic code (11111)? */
+ message->isOK = HEADER_IS_VALID(message);
+ if(!message->isOK){
+ goto bail;
+ }
+
+ /* Feedback item */
+ if((HEADER_GET_T(message)!=0)){
+ initFeedbackItem(message, &dummy_ptr);
+ if(!message->isOK){
+ goto bail;
+ }
+ }
+
+ /*
+ * If the len field is non-zero, then the SigComp message contains a state identifier
+ * to access a state item at the receiving endpoint.
+ */
+ state_len = HEADER_GET_STATE_LENGTH( HEADER_GET_LEN(message) );
+ if(state_len){
+ initStateId(message, &dummy_ptr, state_len);
+ initStateful(message, &dummy_ptr, end_ptr);
+ }
+ else
+ {
+ if( !*dummy_ptr && !(*(dummy_ptr+1)&0xf0) ){
+ // "code_len" field of zero --> it's a nack
+ initNack(message, &dummy_ptr, end_ptr);
+ }
+ else{
+ initStateless(message, &dummy_ptr, end_ptr);
+ }
+ }
+
+ /*
+ * The fields (RFC 3320 section 7) except for the "remaining SigComp message" are referred to
+ * as the "SigComp header" (note that this may include the uploaded UDVM bytecode).
+ */
+ message->header_size = ( message->totalSize - tcomp_buffer_getSize(message->remaining_sigcomp_buffer));
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new SigComp message.");
+ }
+
+bail:
+ if(message && !message->isOK){
+ TSK_OBJECT_SAFE_FREE(message);
+ return tsk_null;
+ }
+
+ return message;
+}
+
+static tsk_object_t* tcomp_message_dtor(tsk_object_t *self)
+{
+ tcomp_message_t *message = self;
+
+ if(message){
+ TSK_OBJECT_SAFE_FREE(message->stateId);
+ TSK_OBJECT_SAFE_FREE(message->remaining_sigcomp_buffer);
+ TSK_OBJECT_SAFE_FREE(message->uploaded_UDVM_buffer);
+ TSK_OBJECT_SAFE_FREE(message->ret_feedback_buffer);
+ TSK_OBJECT_SAFE_FREE(message->nack_info);
+ }
+ else{
+ TSK_DEBUG_WARN("NULL SigComp message.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_message_def_s =
+{
+ sizeof(tcomp_message_t),
+ tcomp_message_ctor,
+ tcomp_message_dtor,
+ tsk_null
+};
+const tsk_object_def_t* tcomp_message_def_t = &tcomp_message_def_s;
diff --git a/tinySIGCOMP/src/tcomp_message.h b/tinySIGCOMP/src/tcomp_message.h
new file mode 100644
index 0000000..5ef9b3b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_message.h
@@ -0,0 +1,74 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_message.h
+ * @brief SIGCOMP message as per RFC 3320 subclause 7.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_MESSAGE_H
+#define TCOMP_MESSAGE_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_buffer.h"
+#include "tcomp_nackinfo.h"
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+
+/**
+* SigComp Message Format as per RFC 3320 subclause 7.
+*/
+typedef struct tcomp_message_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint8_t headerSigComp; /**< SigComp header */
+
+ unsigned isOK:1; /**< Message validity. */
+ unsigned isNack:1; /**< If it's a NACK message. */
+ unsigned stream_based:1; /**< If it's stream message (e.g. TCP) */
+ const uint8_t* startPtr; /**< Message pointer. */
+ tsk_size_t totalSize; /**< The total message size. */
+ tsk_size_t header_size; /**< The size of the message header */
+
+ tcomp_buffer_handle_t* stateId; /**< */
+
+ uint16_t bytecodes_destination; /**< */
+ tcomp_buffer_handle_t* remaining_sigcomp_buffer; /**< */
+ tcomp_buffer_handle_t* uploaded_UDVM_buffer; /**< */
+ tcomp_buffer_handle_t* ret_feedback_buffer; /**< */
+
+ tcomp_nackinfo_t* nack_info; /**< */
+}
+tcomp_message_t;
+
+tcomp_message_t* tcomp_message_create(const void* input_ptr, tsk_size_t input_size, tsk_bool_t stream);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_message_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_MESSAGE_H */
diff --git a/tinySIGCOMP/src/tcomp_nack_codes.h b/tinySIGCOMP/src/tcomp_nack_codes.h
new file mode 100644
index 0000000..eb9a7a7
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_nack_codes.h
@@ -0,0 +1,63 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_nack_codes.h
+ * @brief List of NACK codes as per RFC 4077 subclause 3.2.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef TCOMP_NACKCODES_H
+#define TCOMP_NACKCODES_H
+
+/************************************************************************************
+* Error code details
+*************************************************************************************/
+#define NACK_STATE_NOT_FOUND 1 // State ID (6 - 20 bytes)
+#define NACK_CYCLES_EXHAUSTED 2 // Cycles Per Bit (1 byte)
+#define NACK_USER_REQUESTED 3
+#define NACK_SEGFAULT 4
+#define NACK_TOO_MANY_STATE_REQUESTS 5
+#define NACK_INVALID_STATE_ID_LENGTH 6
+#define NACK_INVALID_STATE_PRIORITY 7
+#define NACK_OUTPUT_OVERFLOW 8
+#define NACK_STACK_UNDERFLOW 9
+#define NACK_BAD_INPUT_BITORDER 10
+#define NACK_DIV_BY_ZERO 11
+#define NACK_SWITCH_VALUE_TOO_HIGH 12
+#define NACK_TOO_MANY_BITS_REQUESTED 13
+#define NACK_INVALID_OPERAND 14
+#define NACK_HUFFMAN_NO_MATCH 15
+#define NACK_MESSAGE_TOO_SHORT 16
+#define NACK_INVALID_CODE_LOCATION 17
+#define NACK_BYTECODES_TOO_LARGE 18 // Memory size (2 bytes)
+#define NACK_INVALID_OPCODE 19
+#define NACK_INVALID_STATE_PROBE 20
+#define NACK_ID_NOT_UNIQUE 21 // State ID (6 - 20 bytes)
+#define NACK_MULTILOAD_OVERWRITTEN 22
+#define NACK_STATE_TOO_SHORT 23 // State ID (6 - 20 bytes)
+#define NACK_INTERNAL_ERROR 24
+#define NACK_FRAMING_ERROR 25
+
+#endif /* TCOMP_NACKCODES_H */
diff --git a/tinySIGCOMP/src/tcomp_nackinfo.c b/tinySIGCOMP/src/tcomp_nackinfo.c
new file mode 100644
index 0000000..54d520b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_nackinfo.c
@@ -0,0 +1,86 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_nackinfo.c
+ * @brief RFC 4077 - A Negative Acknowledgement Mechanism for Signaling Compression (NACK).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_nackinfo.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+/** Creates new NACK object.
+*/
+tcomp_nackinfo_t* tcomp_nackinfo_create()
+{
+ return tsk_object_new(tcomp_nackinfo_def_t);
+}
+
+//========================================================
+// NackInfo object definition
+//
+
+/*
+* Creates a nack info message. You MUST use @ref tcomp_nackinfo_destroy to free the nackinfo.
+* @retval The NACK info message.
+* @sa @ref tcomp_nackinfo_destroy.
+*/
+static tsk_object_t* tcomp_nackinfo_ctor(tsk_object_t *self, va_list* app)
+{
+ tcomp_nackinfo_t *nackinfo = self;
+ if(nackinfo){
+ nackinfo->version = NACK_VERSION;
+ nackinfo->details = tcomp_buffer_create_null();
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new nackinfo.");
+ }
+ return self;
+}
+
+/*
+* Destroy a nackinfo message previously created using @ref tcomp_nackinfo_create.
+* @param nackinfo The NACK info message to free.
+* @sa @ref tcomp_nackinfo_create.
+*/
+static tsk_object_t* tcomp_nackinfo_dtor(tsk_object_t* self)
+{
+ tcomp_nackinfo_t *nackinfo = self;
+ if(nackinfo){
+ TSK_OBJECT_SAFE_FREE(nackinfo->details);
+ }
+ return self;
+}
+
+
+static const tsk_object_def_t tcomp_nackinfo_def_s =
+{
+ sizeof(tcomp_nackinfo_t),
+ tcomp_nackinfo_ctor,
+ tcomp_nackinfo_dtor,
+ tsk_null
+};
+const tsk_object_def_t* tcomp_nackinfo_def_t = &tcomp_nackinfo_def_s;
+
diff --git a/tinySIGCOMP/src/tcomp_nackinfo.h b/tinySIGCOMP/src/tcomp_nackinfo.h
new file mode 100644
index 0000000..57e742b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_nackinfo.h
@@ -0,0 +1,84 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_nackinfo.h
+ * @brief RFC 4077 - A Negative Acknowledgement Mechanism for Signaling Compression (NACK)
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_NAKINFO_H
+#define TCOMP_NAKINFO_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_buffer.h"
+#include "tsk_sha1.h"
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+/*
++---+---+---+---+---+---+---+---+
+| code_len = 0 |
++---+---+---+---+---+---+---+---+
+| code_len = 0 | version = 1 |
++---+---+---+---+---+---+---+---+
+| Reason Code |
++---+---+---+---+---+---+---+---+
+| OPCODE of failed instruction |
++---+---+---+---+---+---+---+---+
+| PC of failed instruction |
+| |
++---+---+---+---+---+---+---+---+
+| |
+: SHA-1 Hash of failed message :
+| |
++---+---+---+---+---+---+---+---+
+| |
+: Error Details :
+| |
++---+---+---+---+---+---+---+---+
+*/
+/**NACK info as per rfc 4077 subclause 3.1.
+* You MUST use @ref tcomp_nackinfo_create() to create new nackinfo object.
+*/
+typedef struct tcomp_nackinfo_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint8_t version; /**< Gives the version of the NACK mechanism being employed. */
+ uint8_t reasonCode; /**< The Reason Code is a one-byte value that indicates the nature of the decompression failure. */
+ uint8_t opcode; /**< The "OPCODE of failed instruction" is a one-byte field that includes the opcode to which the PC was pointing when the failure occurred */
+ uint16_t pc; /**< "PC of failed instruction" is a two-byte field containing the value of the program counter when failure occurred (i.e., the memory address of the failed UDVM instruction) */
+ uint8_t sha1[TSK_SHA1_DIGEST_SIZE]; /**<"SHA-1 Hash of failed message" contains the full 20-byte SHA-1 hash of the SigComp message that could not be decompressed */
+ tcomp_buffer_handle_t *details; /**< "Error Details" provides additional information that might be useful in correcting the problem that caused decompression failure.*/
+}
+tcomp_nackinfo_t;
+
+tcomp_nackinfo_t* tcomp_nackinfo_create();
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_nackinfo_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_NAKINFO_H */
diff --git a/tinySIGCOMP/src/tcomp_operands.h b/tinySIGCOMP/src/tcomp_operands.h
new file mode 100644
index 0000000..d4b8b70
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_operands.h
@@ -0,0 +1,39 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_operands.h
+ * @brief SigComp UDVM operands as per RFC 3312 subclause 8.5.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef TCOMP_OPERANDS_H
+#define TCOMP_OPERANDS_H
+
+#define UDVM_OPERAND__LITERAL 0 /*#*/
+#define UDVM_OPERAND__REFERENCE 1 /*$*/
+#define UDVM_OPERAND__MULTITYPE 2 /*%*/
+#define UDVM_OPERAND__ADDRESS 3 /*@*/
+
+#endif /* TCOMP_NACKCODES_H */
diff --git a/tinySIGCOMP/src/tcomp_params.c b/tinySIGCOMP/src/tcomp_params.c
new file mode 100644
index 0000000..93fabec
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_params.c
@@ -0,0 +1,297 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_params.c
+ * @brief SigComp parameters as per rfc 3320 subclause 3.3.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_params.h"
+#include "tsk_binaryutils.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+tcomp_params_t* tcomp_params_create()
+{
+ return tsk_object_new(tcomp_params_def_t);
+}
+
+/**
+* Checks if CPB, DMS and SMS values have been initialized.
+* @param params The sigcomp parameters containing the values to check.
+* @retval @a tsk_true if values have been set and @a tsk_false otherwise.
+*/
+tsk_bool_t tcomp_params_hasCpbDmsSms(tcomp_params_t* params)
+{
+ if(params){
+ return (params->cpbCode || params->dmsCode || params->smsCode) ? tsk_true : tsk_false;
+ }
+ else{
+ TSK_DEBUG_WARN("Invalid parameter.");
+ }
+
+ return tsk_false;
+}
+
+/**
+* Sets CPB bits.
+* @param params The sigcomp parameters containing cpb bits to set.
+* @param cpbCode The new CPB code.
+* @sa @ref tcomp_params_setCpbValue.
+*/
+void tcomp_params_setCpbCode(tcomp_params_t* params, uint8_t cpbCode)
+{
+ if(params){
+ params->cpbCode = cpbCode;
+ params->cpbValue = sigcomp_encoding_cpb[cpbCode];
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+}
+
+/**
+* Sets CPB bits.
+* @param params The sigcomp parameters containing cpb bits to set.
+* @param cpbValue The new CPB value.
+* @sa @ref tcomp_params_setCpbCode.
+*/
+int tcomp_params_setCpbValue(tcomp_params_t* params, uint8_t cpbValue)
+{
+ if(params)
+ {
+ uint8_t code;
+ for(code=0; code<4; code++){
+ if( cpbValue <= sigcomp_encoding_cpb[code]){
+ params->cpbCode = code;
+ break;
+ }
+ }
+ params->cpbValue = cpbValue;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return -1;
+ }
+}
+
+/**
+* Sets DMS bits.
+* @param params The sigcomp parameters containing dms bits to set.
+* @param dmsCode The new DMS code.
+* @sa @ref tcomp_params_setDmsValue.
+*/
+void tcomp_params_setDmsCode(tcomp_params_t* params, uint8_t dmsCode)
+{
+ if(params){
+ params->dmsCode = dmsCode;
+ params->dmsValue = sigcomp_encoding_dms[dmsCode];
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+}
+
+/**
+* Sets DMS bits.
+* @param params The sigcomp parameters containing dms bits to set.
+* @param dmsValue The new DMS value.
+* @sa @ref tcomp_params_setDmsCode.
+*/
+int tcomp_params_setDmsValue(tcomp_params_t* params, uint32_t dmsValue)
+{
+ if(params){
+ uint8_t code;
+ for(code=1; code<8; code++){
+ if(dmsValue <= sigcomp_encoding_dms[code]){
+ params->dmsCode = code;
+ break;
+ }
+ }
+ params->dmsValue = dmsValue;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return -1;
+ }
+}
+
+/**
+* Sets SMS bits.
+* @param params The sigcomp parameters containing sms bits to set.
+* @param smsCode The new SMS code.
+* @sa @ref tcomp_params_setSmsValue.
+*/
+void tcomp_params_setSmsCode(tcomp_params_t* params, uint8_t smsCode)
+{
+ if(params){
+ params->smsCode = smsCode;
+ params->smsValue = sigcomp_encoding_sms[smsCode];
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+}
+
+/**
+* Sets SMS bits.
+* @param params The sigcomp parameters containing sms bits to set.
+* @param smsValue The new SMS value.
+* @sa @ref tcomp_params_setSmsCode
+*/
+int tcomp_params_setSmsValue(tcomp_params_t* params, uint32_t smsValue)
+{
+ if(params){
+ uint8_t code;
+ for(code = 0; code < 8; code++){
+ if(smsValue <= sigcomp_encoding_sms[code]){
+ params->smsCode = code;
+ break;
+ }
+ }
+ params->smsValue = smsValue;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ return -1;
+ }
+}
+
+/**
+* Gets CPB, DMS and SMS values as a single 2-bytes value.
+* @param params The sigcomp parameters containing the values.
+* @retval CPB||DMS||SMS as 2-bytes value.
+* @sa @ref tcomp_params_setParameters
+*/
+uint16_t tcomp_params_getParameters(tcomp_params_t* params)
+{
+ if(params){
+ /*
+ +---+---+---+---+---+---+---+---+
+ | cpb | dms | sms |
+ +---+---+---+---+---+---+---+---+
+ | SigComp_version |
+ +---+---+---+---+---+---+---+---+
+ */
+ uint16_t result = ((params->cpbCode<<6)|(params->dmsCode<<3)|params->smsCode);
+ result <<=8;
+ return (result | params->SigComp_version);
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+
+ return 0;
+}
+
+/**
+* Sets CPB, DMS and SMS values.
+* @param params The sigcomp parameters containing the values to set.
+* @param sigCompParameters New values as 2-bytes value.
+* @sa @ref tcomp_params_getParameters.
+*/
+void tcomp_params_setParameters(tcomp_params_t* params, uint16_t sigCompParameters)
+{
+ if(params){
+ /*
+ +---+---+---+---+---+---+---+---+
+ | cpb | dms | sms |
+ +---+---+---+---+---+---+---+---+
+ | SigComp_version |
+ +---+---+---+---+---+---+---+---+
+ */
+ tcomp_params_setCpbCode( params, (sigCompParameters>>14) );
+ tcomp_params_setDmsCode( params, ((sigCompParameters>>11) & 0x07) );
+ tcomp_params_setSmsCode( params, ((sigCompParameters>>8) & 0x07) );
+ params->SigComp_version = ( (sigCompParameters & 0x00ff) );
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+}
+
+/**
+* Resets all parameters.
+* @param params The params to reset.
+*/
+void tcomp_params_reset(tcomp_params_t* params)
+{
+ if(params){
+ params->cpbCode = params->dmsCode = params->smsCode = params->SigComp_version = 0;
+ params->cpbValue = params->dmsValue = params->smsValue = 0;
+
+ tsk_list_clear_items(params->returnedStates);
+ }
+ else{
+ TSK_DEBUG_WARN("Invalid parameter.");
+ }
+}
+
+
+
+
+
+
+
+
+//========================================================
+// SigComp parameters object definition
+//
+static tsk_object_t* tcomp_params_ctor(tsk_object_t *self, va_list * app)
+{
+ tcomp_params_t *params = self;
+ if(params){
+ //tcomp_params_reset(params);
+ params->returnedStates = tsk_list_create();
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new sigcomp params.");
+ }
+
+ return self;
+}
+static tsk_object_t* tcomp_params_dtor(tsk_object_t *self)
+{
+ tcomp_params_t *params = self;
+ if(params){
+ TSK_OBJECT_SAFE_FREE(params->returnedStates);
+ }
+ else{
+ TSK_DEBUG_WARN("NULL sigcomp parameters.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_params_def_s =
+{
+ sizeof(tcomp_params_t),
+ tcomp_params_ctor,
+ tcomp_params_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_params_def_t = &tcomp_params_def_s;
diff --git a/tinySIGCOMP/src/tcomp_params.h b/tinySIGCOMP/src/tcomp_params.h
new file mode 100644
index 0000000..1ecb617
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_params.h
@@ -0,0 +1,83 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_params.h
+ * @brief SIGCOMP parameters as per rfc 3320 subclause 3.3.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_PARAMS_H
+#define TCOMP_PARAMS_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_types.h"
+#include "tsk_object.h"
+
+/**@typedef tcomp_params_t
+* SIGCOMP parameters as per rfc 3320 subclause 3.3.
+*/
+
+TCOMP_BEGIN_DECLS
+
+
+typedef struct tcomp_params_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint8_t cpbCode; /**< 'Cycles Per Bit' binary code. You MUST use @ref tcomp_params_setCpbCode to set this value. */
+ uint8_t dmsCode; /**< 'Decompression Memory' Size binary code. You MUST use @ref tcomp_params_setDmsCode to set this value. */
+ uint8_t smsCode; /**< 'State Memory Size' binary code. You MUST use @ref tcomp_params_setSmsCode to set this value. */
+
+ uint8_t cpbValue; /**< 'Cycles Per Bit' value. You MUST use @ref tcomp_params_setCpbValue to set this value. */
+ uint32_t dmsValue; /**< 'Decompression Memory Size' value. You MUST use @ref tcomp_params_setDmsValue to set this value. */
+ uint32_t smsValue; /**< 'State Memory Size' value You MUST use @ref tcomp_params_setSmsValue to set this value. */
+
+ uint8_t SigComp_version; /**< SigComp version. */
+ tcomp_buffers_L_t* returnedStates; /**< List of the returned states. */
+}
+tcomp_params_t;
+
+tcomp_params_t* tcomp_params_create();
+
+tsk_bool_t tcomp_params_hasCpbDmsSms(tcomp_params_t*);
+
+void tcomp_params_setCpbCode(tcomp_params_t*, uint8_t _cpbCode);
+int tcomp_params_setCpbValue(tcomp_params_t*, uint8_t _cpbValue);
+
+void tcomp_params_setDmsCode(tcomp_params_t*, uint8_t _dmsCode);
+int tcomp_params_setDmsValue(tcomp_params_t*, uint32_t _dmsValue);
+
+void tcomp_params_setSmsCode(tcomp_params_t*, uint8_t _smsCode);
+int tcomp_params_setSmsValue(tcomp_params_t*, uint32_t _smsValue);
+
+uint16_t tcomp_params_getParameters(tcomp_params_t*);
+void tcomp_params_setParameters(tcomp_params_t*, uint16_t sigCompParameters);
+
+void tcomp_params_reset(tcomp_params_t*);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_params_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_PARAMS_H */
diff --git a/tinySIGCOMP/src/tcomp_reqfeed.c b/tinySIGCOMP/src/tcomp_reqfeed.c
new file mode 100644
index 0000000..cc6b46f
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_reqfeed.c
@@ -0,0 +1,97 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_reqfeed.c
+ * @brief SIGCOMP requested feedback item as per rfc 3320 subclause 9.4.9.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_reqfeed.h"
+#include "tcomp_buffer.h"
+
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+/** Creates new Requested feedback.
+*/
+tcomp_reqfeed_t* tcomp_reqfeed_create()
+{
+ return tsk_object_new(tcomp_reqfeed_def_t);
+}
+
+/**
+* Reset the feedback.
+* @param feedback The feedback to reset.
+*/
+void tcomp_reqfeed_reset(tcomp_reqfeed_t* feedback)
+{
+ if(feedback){
+ tcomp_buffer_freeBuff(feedback->item);
+ tcomp_buffer_reset(feedback->item);
+
+ feedback->Q = feedback->S = feedback->I = 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter.");
+ }
+}
+
+
+
+
+//========================================================
+// Requested feedback object definition
+//
+static void* tcomp_reqfeed_ctor(void * self, va_list * app)
+{
+ tcomp_reqfeed_t *feedback = self;
+ if(feedback){
+ feedback->item = tcomp_buffer_create_null();
+ }
+ else{
+ TSK_DEBUG_WARN("NULL feedback");
+ }
+
+ return self;
+}
+static void* tcomp_reqfeed_dtor(void* self)
+{
+ tcomp_reqfeed_t *feedback = self;
+ if(feedback){
+ TSK_OBJECT_SAFE_FREE(feedback->item);
+ }
+ else{
+ TSK_DEBUG_WARN("NULL feedback");
+ }
+ return self;
+}
+
+static const tsk_object_def_t tcomp_reqfeed_def_s =
+{
+ sizeof(tcomp_reqfeed_t),
+ tcomp_reqfeed_ctor,
+ tcomp_reqfeed_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_reqfeed_def_t = &tcomp_reqfeed_def_s;
diff --git a/tinySIGCOMP/src/tcomp_reqfeed.h b/tinySIGCOMP/src/tcomp_reqfeed.h
new file mode 100644
index 0000000..d69c22b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_reqfeed.h
@@ -0,0 +1,75 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_reqfeed.h
+ * @brief SIGCOMP requested feedback item as per rfc 3320 subclause 9.4.9.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_REQ_FEEDBACK_H
+#define TCOMP_REQ_FEEDBACK_H
+
+#include "tinysigcomp_config.h"
+#include "tcomp_buffer.h"
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+/*
+0 1 2 3 4 5 6 7
++---+---+---+---+---+---+---+---+
+| reserved | Q | S | I | requested_feedback_location
++---+---+---+---+---+---+---+---+
+| |
+: requested feedback item : if Q = 1
+| |
++---+---+---+---+---+---+---+---+
+*/
+
+/** SigComp Requested feedback item as per RFC 3320 subclause 9.4.9.
+*/
+typedef struct tcomp_reqfeed_s
+{
+ TSK_DECLARE_OBJECT;
+
+ unsigned Q:1; /**< The Q-bit indicates whether a requested feedback item is present or not.*/
+ unsigned S:1; /**< The compressor sets the S-bit to 1 if it does not wish (or no longer
+ wishes) to save state information at the receiving endpoint and also
+ does not wish to access state information that it has previously saved.*/
+ unsigned I:1; /**< Similarly the compressor sets the I-bit to 1 if it does not wish (or
+ no longer wishes) to access any of the locally available state items
+ offered by the receiving endpoint.*/
+ tcomp_buffer_handle_t *item; /**< The requested item feedback data */
+}
+tcomp_reqfeed_t;
+
+tcomp_reqfeed_t* tcomp_reqfeed_create();
+
+void tcomp_reqfeed_reset(tcomp_reqfeed_t*);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_reqfeed_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_REQ_FEEDBACK_H */
diff --git a/tinySIGCOMP/src/tcomp_result.c b/tinySIGCOMP/src/tcomp_result.c
new file mode 100644
index 0000000..6c5efaa
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_result.c
@@ -0,0 +1,272 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_result.c
+ * @brief SigComp decompresion result.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_result.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+/** Creates new SigComp result object.
+*/
+tcomp_result_t* tcomp_result_create()
+{
+ return tsk_object_new(tcomp_result_def_t);
+}
+
+tcomp_tempstate_to_free_t* tcomp_tempstate_to_free_create()
+{
+ return tsk_object_new(tcomp_tempstate_to_free_def_t);
+}
+
+/**Resets the result.
+*/
+void _tcomp_result_reset(tcomp_result_t *result, tsk_bool_t isDestructor, tsk_bool_t isResetOutput)
+{
+ if(result){
+ uint8_t i;
+ for(i = 0; i < result->statesToCreateIndex; i++){
+ TSK_OBJECT_SAFE_FREE(result->statesToCreate[i]);
+ }
+
+ for(i = 0; i < result->statesToFreeIndex; i++){
+ TSK_OBJECT_SAFE_FREE(result->statesToFree[i]);
+ }
+
+ if(!isDestructor){
+ result->statesToCreateIndex = 0;
+ result->statesToFreeIndex = 0;
+ result->consumed_cycles = 0;
+
+ tcomp_params_reset(result->remote_parameters);
+
+ if(isResetOutput){
+ tcomp_buffer_reset(result->output_buffer);
+ }
+
+ tcomp_reqfeed_reset(result->req_feedback);
+ tcomp_buffer_freeBuff(result->ret_feedback);
+
+ result->isNack = 0;
+ tcomp_buffer_freeBuff(result->nack_info);
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+}
+
+/**Sets the output buffer.
+*/
+void tcomp_result_setOutputBuffer(tcomp_result_t *result, void *output_ptr, tsk_size_t output_size, tsk_bool_t isStream, uint64_t streamId)
+{
+ if(result){
+ tcomp_buffer_referenceBuff(result->output_buffer, (uint8_t*)output_ptr, output_size);
+ result->isStreamBased = isStream;
+ result->streamId = streamId;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+}
+
+/**Sets the compartment identifier.
+*/
+void tcomp_result_setCompartmentId(tcomp_result_t *result, const void *id, tsk_size_t len)
+{
+ if(result){
+ result->compartmentId = tcomp_buffer_createHash(id, len);
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+}
+
+/**Adds temporary state.
+*/
+void tcomp_result_addTempStateToCreate(tcomp_result_t *result, tcomp_state_t* lpState)
+{
+ if(result){
+ /*
+ * Note that there is a maximum limit of four state creation requestsper instance of the UDVM.
+ */
+ if(result->statesToCreateIndex >= MAX_TEMP_SATES) {
+ return;
+ }
+
+ // Add state
+ result->statesToCreate[result->statesToCreateIndex++] = lpState;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+}
+
+/**Gets the number of temporary state (to be created).
+*/
+uint8_t tcomp_result_getTempStatesToCreateSize(const tcomp_result_t *result)
+{
+ if(result){
+ return result->statesToCreateIndex;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+ return 0;
+}
+
+/**Adds temporary state (to be freed).
+*/
+void tcomp_result_addTempStateToFree(tcomp_result_t *result, tcomp_tempstate_to_free_t* lpDesc)
+{
+ if(result){
+ /*
+ * Decompression failure MUST occur if more than four state free
+ * requests are made before the END-MESSAGE instruction is encountered.
+ */
+ if(result->statesToFreeIndex >= MAX_TEMP_SATES) {
+ return;
+ }
+ result->statesToFree[result->statesToFreeIndex++] = lpDesc;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+}
+
+/**Gets the number of temporary state (to be be freed).
+*/
+uint8_t tcomp_result_getTempStatesToFreeSize(const tcomp_result_t *result)
+{
+ if(result){
+ return result->statesToFreeIndex;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL SigComp result.");
+ }
+ return 0;
+}
+
+
+
+
+
+//========================================================
+// SigComp result object definition
+//
+
+static tsk_object_t* tcomp_result_ctor(tsk_object_t *self, va_list * app)
+{
+ tcomp_result_t* result = self;
+
+ if(result){
+ result->output_buffer = tcomp_buffer_create_null();
+ result->ret_feedback = tcomp_buffer_create_null();
+ result->nack_info = tcomp_buffer_create_null();
+
+ result->remote_parameters = tcomp_params_create();
+
+ result->req_feedback = tcomp_reqfeed_create();
+ }
+ else{
+ TSK_DEBUG_ERROR("Null result object");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_result_dtor(tsk_object_t * self)
+{
+ tcomp_result_t* result = self;
+
+ if(result){
+ _tcomp_result_reset(result, tsk_true, tsk_true);
+ TSK_OBJECT_SAFE_FREE(result->output_buffer);
+ TSK_OBJECT_SAFE_FREE(result->ret_feedback);
+ TSK_OBJECT_SAFE_FREE(result->nack_info);
+
+ TSK_OBJECT_SAFE_FREE(result->remote_parameters);
+
+ TSK_OBJECT_SAFE_FREE(result->req_feedback);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null result object");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_result_def_s =
+{
+ sizeof(tcomp_result_t),
+ tcomp_result_ctor,
+ tcomp_result_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_result_def_t = &tcomp_result_def_s;
+
+
+//========================================================
+// SigComp temporary state object definition
+//
+
+static tsk_object_t* tcomp_tempstate_to_free_ctor(tsk_object_t* self, va_list * app)
+{
+ tcomp_tempstate_to_free_t* tempstate_to_free = self;
+
+ if(tempstate_to_free){
+ tempstate_to_free->identifier = tcomp_buffer_create_null();
+ }
+ else{
+ TSK_DEBUG_ERROR("Null object");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_tempstate_to_free_dtor(tsk_object_t* self)
+{
+ tcomp_tempstate_to_free_t* tempstate_to_free = self;
+
+ if(tempstate_to_free){
+ TSK_OBJECT_SAFE_FREE(tempstate_to_free->identifier);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null object");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_tempstate_to_free_def_s =
+{
+ sizeof(tcomp_tempstate_to_free_t),
+ tcomp_tempstate_to_free_ctor,
+ tcomp_tempstate_to_free_dtor,
+ tsk_null
+};
+const tsk_object_def_t* tcomp_tempstate_to_free_def_t = &tcomp_tempstate_to_free_def_s;
diff --git a/tinySIGCOMP/src/tcomp_result.h b/tinySIGCOMP/src/tcomp_result.h
new file mode 100644
index 0000000..8072a98
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_result.h
@@ -0,0 +1,112 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_result.h
+ * @brief SIGCOMP decompresion result.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_RESULT_H
+#define TCOMP_RESULT_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_state.h"
+#include "tcomp_reqfeed.h"
+#include "tcomp_params.h"
+#include "tcomp_buffer.h"
+
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+#define MAX_TEMP_SATES 4
+
+typedef struct tcomp_tempstate_to_free_s
+{
+ TSK_DECLARE_OBJECT;
+
+ // Operands
+ uint16_t partial_identifier_start;
+ uint16_t partial_identifier_length;
+ // identifier
+ tcomp_buffer_handle_t *identifier;
+}
+tcomp_tempstate_to_free_t;
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_tempstate_to_free_def_t;
+
+/**SigComp decompression result.
+*/
+typedef struct tcomp_result_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint64_t compartmentId;
+ tcomp_state_t* statesToCreate[MAX_TEMP_SATES];
+ uint8_t statesToCreateIndex;
+
+ tcomp_tempstate_to_free_t* statesToFree[MAX_TEMP_SATES];
+ uint8_t statesToFreeIndex;
+
+ uint64_t streamId;
+ unsigned isStreamBased:1;
+ tcomp_buffer_handle_t *output_buffer;
+
+ tcomp_reqfeed_t *req_feedback;
+ tcomp_params_t *remote_parameters;
+ tcomp_buffer_handle_t *ret_feedback;
+
+ unsigned isNack:1;
+ tcomp_buffer_handle_t *nack_info;
+
+ uint64_t consumed_cycles;
+}
+tcomp_result_t;
+
+TINYSIGCOMP_API tcomp_result_t* tcomp_result_create();
+tcomp_tempstate_to_free_t* tcomp_tempstate_to_free_create();
+
+void _tcomp_result_reset(tcomp_result_t *result, int isDestructor, int isResetOutput);
+#define tcomp_result_reset(result) _tcomp_result_reset((tcomp_result_t *)result, tsk_false, tsk_true)
+
+TINYSIGCOMP_API void tcomp_result_setOutputBuffer(tcomp_result_t *result, void *output_ptr, tsk_size_t output_size, tsk_bool_t isStream, uint64_t streamId);
+#define tcomp_result_setOutputUDPBuffer(result, output_ptr, output_size) tcomp_result_setOutputBuffer((tcomp_result_t *)result, (void *)output_ptr, (tsk_size_t) output_size, tsk_false, 0)
+#define tcomp_result_setOutputTCPBuffer(result, output_ptr, output_size, streamId) tcomp_result_setOutputBuffer((tcomp_result_t *)result, (void *)output_ptr, (tsk_size_t) output_size, tsk_true, (uint64_t)streamId)
+#define tcomp_result_setOutputSCTPBuffer(result, output_ptr, output_size) tcomp_result_setOutputTCPBuffer
+
+TINYSIGCOMP_API void tcomp_result_setCompartmentId(tcomp_result_t *result, const void *id, tsk_size_t len);
+
+void tcomp_result_addTempStateToCreate(tcomp_result_t *result, tcomp_state_t* lpState);
+uint8_t tcomp_result_getTempStatesToCreateSize(const tcomp_result_t *result);
+
+void tcomp_result_addTempStateToFree(tcomp_result_t *result, tcomp_tempstate_to_free_t* lpDesc);
+uint8_t tcomp_result_getTempStatesToFreeSize(const tcomp_result_t *result);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_result_def_t;
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_tempstate_to_free_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_RESULT_H */
diff --git a/tinySIGCOMP/src/tcomp_rfc3485_dictionary_sip.h b/tinySIGCOMP/src/tcomp_rfc3485_dictionary_sip.h
new file mode 100644
index 0000000..e9e78bc
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_rfc3485_dictionary_sip.h
@@ -0,0 +1,272 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_rfc3485_dictionary_sip.h
+ * @brief RFC 3485 - The Session Initiation Protocol (SIP) and Session Description Protocol
+ * (SDP) Static Dictionary for Signaling Compression (SigComp)
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSIGCOMPP_RFC3485_H_
+#define _TINYSIGCOMPP_RFC3485_H_
+
+TCOMP_BEGIN_DECLS
+
+#define RFC3485_DICTIONARY_SIP_VALUE_LENGTH 0x12e4
+#define RFC3485_DICTIONARY_SIP_STATE_ADDRESS 0 /*(not relevant for the dictionary) */
+#define RFC3485_DICTIONARY_SIP_STATE_INSTRUCTION 0 /*(not relevant for the dictionary) */
+#define RFC3485_DICTIONARY_SIP_MINIMUM_ACCESS_LENGTH 6
+
+#define RFC3485_DICTIONARY_SIP_IDENTIFIER_LENGTH 20
+
+#define RFC3485_DICTIONARY_SIP_IDENTIFIER \
+ "\xfb\xe5\x07\xdf\xe5\xe6\xaa\x5a\xf2\xab\xb9\x14\xce\xaa\x05\xf9\x9c\xe6\x1b\xa5"
+
+#define RFC3485_DICTIONARY_SIP_VALUE \
+ "\x0d\x0a\x52\x65\x6a\x65\x63\x74\x2d\x43\x6f\x6e\x74\x61\x63\x74\x3a\x20\x0d\x0a\x45\x72" \
+ "\x72\x6f\x72\x2d\x49\x6e\x66\x6f\x3a\x20\x0d\x0a\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x3a" \
+ "\x20\x0d\x0a\x43\x61\x6c\x6c\x2d\x49\x6e\x66\x6f\x3a\x20\x0d\x0a\x52\x65\x70\x6c\x79\x2d" \
+ "\x54\x6f\x3a\x20\x0d\x0a\x57\x61\x72\x6e\x69\x6e\x67\x3a\x20\x0d\x0a\x53\x75\x62\x6a\x65" \
+ "\x63\x74\x3a\x20\x3b\x68\x61\x6e\x64\x6c\x69\x6e\x67\x3d\x69\x6d\x61\x67\x65\x3b\x70\x75" \
+ "\x72\x70\x6f\x73\x65\x3d\x3b\x63\x61\x75\x73\x65\x3d\x3b\x74\x65\x78\x74\x3d\x63\x61\x72" \
+ "\x64\x33\x30\x30\x20\x4d\x75\x6c\x74\x69\x70\x6c\x65\x20\x43\x68\x6f\x69\x63\x65\x73\x6d" \
+ "\x69\x6d\x65\x73\x73\x61\x67\x65\x2f\x73\x69\x70\x66\x72\x61\x67\x34\x30\x37\x20\x50\x72" \
+ "\x6f\x78\x79\x20\x41\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e\x20\x52\x65\x71" \
+ "\x75\x69\x72\x65\x64\x69\x67\x65\x73\x74\x2d\x69\x6e\x74\x65\x67\x72\x69\x74\x79\x34\x38" \
+ "\x34\x20\x41\x64\x64\x72\x65\x73\x73\x20\x49\x6e\x63\x6f\x6d\x70\x6c\x65\x74\x65\x6c\x65" \
+ "\x70\x68\x6f\x6e\x65\x2d\x65\x76\x65\x6e\x74\x73\x34\x39\x34\x20\x53\x65\x63\x75\x72\x69" \
+ "\x74\x79\x20\x41\x67\x72\x65\x65\x6d\x65\x6e\x74\x20\x52\x65\x71\x75\x69\x72\x65\x64\x65" \
+ "\x61\x63\x74\x69\x76\x61\x74\x65\x64\x34\x38\x31\x20\x43\x61\x6c\x6c\x2f\x54\x72\x61\x6e" \
+ "\x73\x61\x63\x74\x69\x6f\x6e\x20\x44\x6f\x65\x73\x20\x4e\x6f\x74\x20\x45\x78\x69\x73\x74" \
+ "\x61\x6c\x65\x3d\x35\x30\x30\x20\x53\x65\x72\x76\x65\x72\x20\x49\x6e\x74\x65\x72\x6e\x61" \
+ "\x6c\x20\x45\x72\x72\x6f\x72\x6f\x62\x75\x73\x74\x2d\x73\x6f\x72\x74\x69\x6e\x67\x3d\x34" \
+ "\x31\x36\x20\x55\x6e\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x20\x55\x52\x49\x20\x53\x63\x68" \
+ "\x65\x6d\x65\x72\x67\x65\x6e\x63\x79\x34\x31\x35\x20\x55\x6e\x73\x75\x70\x70\x6f\x72\x74" \
+ "\x65\x64\x20\x4d\x65\x64\x69\x61\x20\x54\x79\x70\x65\x6e\x64\x69\x6e\x67\x34\x38\x38\x20" \
+ "\x4e\x6f\x74\x20\x41\x63\x63\x65\x70\x74\x61\x62\x6c\x65\x20\x48\x65\x72\x65\x6a\x65\x63" \
+ "\x74\x65\x64\x34\x32\x33\x20\x49\x6e\x74\x65\x72\x76\x61\x6c\x20\x54\x6f\x6f\x20\x42\x72" \
+ "\x69\x65\x66\x72\x6f\x6d\x2d\x74\x61\x67\x51\x2e\x38\x35\x30\x35\x20\x56\x65\x72\x73\x69" \
+ "\x6f\x6e\x20\x4e\x6f\x74\x20\x53\x75\x70\x70\x6f\x72\x74\x65\x64\x34\x30\x33\x20\x46\x6f" \
+ "\x72\x62\x69\x64\x64\x65\x6e\x6f\x6e\x2d\x75\x72\x67\x65\x6e\x74\x34\x32\x39\x20\x50\x72" \
+ "\x6f\x76\x69\x64\x65\x20\x52\x65\x66\x65\x72\x72\x6f\x72\x20\x49\x64\x65\x6e\x74\x69\x74" \
+ "\x79\x34\x32\x30\x20\x42\x61\x64\x20\x45\x78\x74\x65\x6e\x73\x69\x6f\x6e\x6f\x72\x65\x73" \
+ "\x6f\x75\x72\x63\x65\x0d\x0a\x61\x3d\x6b\x65\x79\x2d\x6d\x67\x6d\x74\x3a\x6d\x69\x6b\x65" \
+ "\x79\x4f\x50\x54\x49\x4f\x4e\x53\x20\x4c\x61\x6e\x67\x75\x61\x67\x65\x3a\x20\x35\x30\x34" \
+ "\x20\x53\x65\x72\x76\x65\x72\x20\x54\x69\x6d\x65\x2d\x6f\x75\x74\x6f\x2d\x74\x61\x67\x0d" \
+ "\x0a\x41\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e\x2d\x49\x6e\x66\x6f\x3a\x20" \
+ "\x44\x65\x63\x20\x33\x38\x30\x20\x41\x6c\x74\x65\x72\x6e\x61\x74\x69\x76\x65\x20\x53\x65" \
+ "\x72\x76\x69\x63\x65\x35\x30\x33\x20\x53\x65\x72\x76\x69\x63\x65\x20\x55\x6e\x61\x76\x61" \
+ "\x69\x6c\x61\x62\x6c\x65\x34\x32\x31\x20\x45\x78\x74\x65\x6e\x73\x69\x6f\x6e\x20\x52\x65" \
+ "\x71\x75\x69\x72\x65\x64\x34\x30\x35\x20\x4d\x65\x74\x68\x6f\x64\x20\x4e\x6f\x74\x20\x41" \
+ "\x6c\x6c\x6f\x77\x65\x64\x34\x38\x37\x20\x52\x65\x71\x75\x65\x73\x74\x20\x54\x65\x72\x6d" \
+ "\x69\x6e\x61\x74\x65\x64\x61\x75\x74\x68\x2d\x69\x6e\x74\x65\x72\x6c\x65\x61\x76\x69\x6e" \
+ "\x67\x3d\x0d\x0a\x6d\x3d\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x20\x41\x75\x67\x20" \
+ "\x35\x31\x33\x20\x4d\x65\x73\x73\x61\x67\x65\x20\x54\x6f\x6f\x20\x4c\x61\x72\x67\x65\x36" \
+ "\x38\x37\x20\x44\x69\x61\x6c\x6f\x67\x20\x54\x65\x72\x6d\x69\x6e\x61\x74\x65\x64\x33\x30" \
+ "\x32\x20\x4d\x6f\x76\x65\x64\x20\x54\x65\x6d\x70\x6f\x72\x61\x72\x69\x6c\x79\x33\x30\x31" \
+ "\x20\x4d\x6f\x76\x65\x64\x20\x50\x65\x72\x6d\x61\x6e\x65\x6e\x74\x6c\x79\x6d\x75\x6c\x74" \
+ "\x69\x70\x61\x72\x74\x2f\x73\x69\x67\x6e\x65\x64\x0d\x0a\x52\x65\x74\x72\x79\x2d\x41\x66" \
+ "\x74\x65\x72\x3a\x20\x47\x4d\x54\x68\x75\x2c\x20\x34\x30\x32\x20\x50\x61\x79\x6d\x65\x6e" \
+ "\x74\x20\x52\x65\x71\x75\x69\x72\x65\x64\x0d\x0a\x61\x3d\x6f\x72\x69\x65\x6e\x74\x3a\x6c" \
+ "\x61\x6e\x64\x73\x63\x61\x70\x65\x34\x30\x30\x20\x42\x61\x64\x20\x52\x65\x71\x75\x65\x73" \
+ "\x74\x72\x75\x65\x34\x39\x31\x20\x52\x65\x71\x75\x65\x73\x74\x20\x50\x65\x6e\x64\x69\x6e" \
+ "\x67\x35\x30\x31\x20\x4e\x6f\x74\x20\x49\x6d\x70\x6c\x65\x6d\x65\x6e\x74\x65\x64\x34\x30" \
+ "\x36\x20\x4e\x6f\x74\x20\x41\x63\x63\x65\x70\x74\x61\x62\x6c\x65\x36\x30\x36\x20\x4e\x6f" \
+ "\x74\x20\x41\x63\x63\x65\x70\x74\x61\x62\x6c\x65\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x62" \
+ "\x72\x6f\x61\x64\x63\x61\x73\x74\x6f\x6e\x65\x34\x39\x33\x20\x55\x6e\x64\x65\x63\x69\x70" \
+ "\x68\x65\x72\x61\x62\x6c\x65\x0d\x0a\x4d\x49\x4d\x45\x2d\x56\x65\x72\x73\x69\x6f\x6e\x3a" \
+ "\x20\x4d\x61\x79\x20\x34\x38\x32\x20\x4c\x6f\x6f\x70\x20\x44\x65\x74\x65\x63\x74\x65\x64" \
+ "\x0d\x0a\x4f\x72\x67\x61\x6e\x69\x7a\x61\x74\x69\x6f\x6e\x3a\x20\x4a\x75\x6e\x20\x6d\x6f" \
+ "\x64\x65\x2d\x63\x68\x61\x6e\x67\x65\x2d\x6e\x65\x69\x67\x68\x62\x6f\x72\x3d\x63\x72\x69" \
+ "\x74\x69\x63\x61\x6c\x65\x72\x74\x63\x70\x2d\x66\x62\x34\x38\x39\x20\x42\x61\x64\x20\x45" \
+ "\x76\x65\x6e\x74\x6c\x73\x0d\x0a\x55\x6e\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x3a\x20\x4a" \
+ "\x61\x6e\x20\x35\x30\x32\x20\x42\x61\x64\x20\x47\x61\x74\x65\x77\x61\x79\x6d\x6f\x64\x65" \
+ "\x2d\x63\x68\x61\x6e\x67\x65\x2d\x70\x65\x72\x69\x6f\x64\x3d\x0d\x0a\x61\x3d\x6f\x72\x69" \
+ "\x65\x6e\x74\x3a\x73\x65\x61\x73\x63\x61\x70\x65\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x6d" \
+ "\x6f\x64\x65\x72\x61\x74\x65\x64\x34\x30\x34\x20\x4e\x6f\x74\x20\x46\x6f\x75\x6e\x64\x33" \
+ "\x30\x35\x20\x55\x73\x65\x20\x50\x72\x6f\x78\x79\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x72" \
+ "\x65\x63\x76\x6f\x6e\x6c\x79\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x6d\x65\x65\x74\x69\x6e" \
+ "\x67\x0d\x0a\x6b\x3d\x70\x72\x6f\x6d\x70\x74\x3a\x0d\x0a\x52\x65\x66\x65\x72\x72\x65\x64" \
+ "\x2d\x42\x79\x3a\x20\x0d\x0a\x49\x6e\x2d\x52\x65\x70\x6c\x79\x2d\x54\x6f\x3a\x20\x54\x52" \
+ "\x55\x45\x6e\x63\x6f\x64\x69\x6e\x67\x3a\x20\x31\x38\x32\x20\x51\x75\x65\x75\x65\x64\x41" \
+ "\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x3a\x20\x0d\x0a\x55\x73\x65\x72\x2d\x41\x67" \
+ "\x65\x6e\x74\x3a\x20\x0d\x0a\x61\x3d\x66\x72\x61\x6d\x65\x72\x61\x74\x65\x3a\x0d\x0a\x41" \
+ "\x6c\x65\x72\x74\x2d\x49\x6e\x66\x6f\x3a\x20\x43\x41\x4e\x43\x45\x4c\x20\x0d\x0a\x61\x3d" \
+ "\x6d\x61\x78\x70\x74\x69\x6d\x65\x3a\x3b\x72\x65\x74\x72\x79\x2d\x61\x66\x74\x65\x72\x3d" \
+ "\x75\x61\x63\x68\x61\x6e\x6e\x65\x6c\x73\x3d\x34\x31\x30\x20\x47\x6f\x6e\x65\x0d\x0a\x52" \
+ "\x65\x66\x65\x72\x2d\x54\x6f\x3a\x20\x0d\x0a\x50\x72\x69\x6f\x72\x69\x74\x79\x3a\x20\x0d" \
+ "\x0a\x6d\x3d\x63\x6f\x6e\x74\x72\x6f\x6c\x20\x0d\x0a\x61\x3d\x71\x75\x61\x6c\x69\x74\x79" \
+ "\x3a\x0d\x0a\x61\x3d\x73\x64\x70\x6c\x61\x6e\x67\x3a\x0d\x0a\x61\x3d\x63\x68\x61\x72\x73" \
+ "\x65\x74\x3a\x0d\x0a\x52\x65\x70\x6c\x61\x63\x65\x73\x3a\x20\x52\x45\x46\x45\x52\x20\x69" \
+ "\x70\x73\x65\x63\x2d\x69\x6b\x65\x3b\x74\x72\x61\x6e\x73\x70\x6f\x72\x74\x3d\x0d\x0a\x61" \
+ "\x3d\x6b\x65\x79\x77\x64\x73\x3a\x0d\x0a\x6b\x3d\x62\x61\x73\x65\x36\x34\x3a\x3b\x72\x65" \
+ "\x66\x72\x65\x73\x68\x65\x72\x3d\x0d\x0a\x61\x3d\x70\x74\x69\x6d\x65\x3a\x0d\x0a\x6b\x3d" \
+ "\x63\x6c\x65\x61\x72\x3a\x3b\x72\x65\x63\x65\x69\x76\x65\x64\x3d\x3b\x64\x75\x72\x61\x74" \
+ "\x69\x6f\x6e\x3d\x0d\x0a\x41\x63\x63\x65\x70\x74\x3a\x20\x0d\x0a\x61\x3d\x67\x72\x6f\x75" \
+ "\x70\x3a\x46\x41\x4c\x53\x45\x3a\x20\x49\x4e\x46\x4f\x20\x0d\x0a\x41\x63\x63\x65\x70\x74" \
+ "\x2d\x0d\x0a\x61\x3d\x6c\x61\x6e\x67\x3a\x0d\x0a\x6d\x3d\x64\x61\x74\x61\x20\x6d\x6f\x64" \
+ "\x65\x2d\x73\x65\x74\x3d\x0d\x0a\x61\x3d\x74\x6f\x6f\x6c\x3a\x54\x4c\x53\x75\x6e\x2c\x20" \
+ "\x0d\x0a\x44\x61\x74\x65\x3a\x20\x0d\x0a\x61\x3d\x63\x61\x74\x3a\x0d\x0a\x6b\x3d\x75\x72" \
+ "\x69\x3a\x0d\x0a\x50\x72\x6f\x78\x79\x2d\x3b\x72\x65\x61\x73\x6f\x6e\x3d\x3b\x6d\x65\x74" \
+ "\x68\x6f\x64\x3d\x0d\x0a\x61\x3d\x6d\x69\x64\x3a\x3b\x6d\x61\x64\x64\x72\x3d\x6f\x70\x61" \
+ "\x71\x75\x65\x3d\x0d\x0a\x4d\x69\x6e\x2d\x3b\x61\x6c\x67\x3d\x4d\x6f\x6e\x2c\x20\x54\x75" \
+ "\x65\x2c\x20\x57\x65\x64\x2c\x20\x46\x72\x69\x2c\x20\x53\x61\x74\x2c\x20\x3b\x74\x74\x6c" \
+ "\x3d\x61\x75\x74\x73\x3d\x0d\x0a\x72\x3d\x0d\x0a\x7a\x3d\x0d\x0a\x65\x3d\x3b\x69\x64\x3d" \
+ "\x0d\x0a\x69\x3d\x63\x72\x63\x3d\x0d\x0a\x75\x3d\x3b\x71\x3d\x75\x61\x73\x34\x31\x34\x20" \
+ "\x52\x65\x71\x75\x65\x73\x74\x2d\x55\x52\x49\x20\x54\x6f\x6f\x20\x4c\x6f\x6e\x67\x69\x76" \
+ "\x65\x75\x70\x72\x69\x76\x61\x63\x79\x75\x64\x70\x72\x65\x66\x65\x72\x36\x30\x30\x20\x42" \
+ "\x75\x73\x79\x20\x45\x76\x65\x72\x79\x77\x68\x65\x72\x65\x71\x75\x69\x72\x65\x64\x34\x38" \
+ "\x30\x20\x54\x65\x6d\x70\x6f\x72\x61\x72\x69\x6c\x79\x20\x55\x6e\x61\x76\x61\x69\x6c\x61" \
+ "\x62\x6c\x65\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x48\x2e\x33\x33\x32\x30\x32\x20\x41\x63" \
+ "\x63\x65\x70\x74\x65\x64\x0d\x0a\x53\x65\x73\x73\x69\x6f\x6e\x2d\x45\x78\x70\x69\x72\x65" \
+ "\x73\x3a\x20\x0d\x0a\x53\x75\x62\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x2d\x53\x74\x61\x74" \
+ "\x65\x3a\x20\x4e\x6f\x76\x20\x0d\x0a\x53\x65\x72\x76\x69\x63\x65\x2d\x52\x6f\x75\x74\x65" \
+ "\x3a\x20\x53\x65\x70\x20\x0d\x0a\x41\x6c\x6c\x6f\x77\x2d\x45\x76\x65\x6e\x74\x73\x3a\x20" \
+ "\x46\x65\x62\x20\x0d\x0a\x61\x3d\x69\x6e\x61\x63\x74\x69\x76\x65\x52\x54\x50\x2f\x53\x41" \
+ "\x56\x50\x20\x52\x54\x50\x2f\x41\x56\x50\x46\x20\x41\x6e\x6f\x6e\x79\x6d\x6f\x75\x73\x69" \
+ "\x70\x73\x3a\x0d\x0a\x61\x3d\x74\x79\x70\x65\x3a\x74\x65\x73\x74\x65\x6c\x3a\x4d\x45\x53" \
+ "\x53\x41\x47\x45\x20\x0d\x0a\x61\x3d\x72\x65\x63\x76\x6f\x6e\x6c\x79\x0d\x0a\x61\x3d\x73" \
+ "\x65\x6e\x64\x6f\x6e\x6c\x79\x0d\x0a\x63\x3d\x49\x4e\x20\x49\x50\x34\x20\x0d\x0a\x52\x65" \
+ "\x61\x73\x6f\x6e\x3a\x20\x0d\x0a\x41\x6c\x6c\x6f\x77\x3a\x20\x0d\x0a\x45\x76\x65\x6e\x74" \
+ "\x3a\x20\x0d\x0a\x50\x61\x74\x68\x3a\x20\x3b\x75\x73\x65\x72\x3d\x0d\x0a\x62\x3d\x41\x53" \
+ "\x20\x43\x54\x20\x0d\x0a\x57\x57\x57\x2d\x41\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65" \
+ "\x3a\x20\x44\x69\x67\x65\x73\x74\x20\x0d\x0a\x61\x3d\x73\x65\x6e\x64\x72\x65\x63\x76\x69" \
+ "\x64\x65\x6f\x63\x74\x65\x74\x2d\x61\x6c\x69\x67\x6e\x3d\x61\x70\x70\x6c\x69\x63\x61\x74" \
+ "\x69\x6f\x6e\x2f\x73\x64\x70\x61\x74\x68\x65\x61\x64\x65\x72\x73\x70\x61\x75\x74\x68\x3d" \
+ "\x0d\x0a\x61\x3d\x6f\x72\x69\x65\x6e\x74\x3a\x70\x6f\x72\x74\x72\x61\x69\x74\x69\x6d\x65" \
+ "\x6f\x75\x74\x74\x72\x2d\x69\x6e\x74\x69\x63\x6f\x6e\x63\x3d\x34\x38\x33\x20\x54\x6f\x6f" \
+ "\x20\x4d\x61\x6e\x79\x20\x48\x6f\x70\x73\x6c\x69\x6e\x66\x6f\x70\x74\x69\x6f\x6e\x61\x6c" \
+ "\x67\x6f\x72\x69\x74\x68\x6d\x3d\x36\x30\x34\x20\x44\x6f\x65\x73\x20\x4e\x6f\x74\x20\x45" \
+ "\x78\x69\x73\x74\x20\x41\x6e\x79\x77\x68\x65\x72\x65\x73\x70\x6f\x6e\x73\x65\x3d\x0d\x0a" \
+ "\x0d\x0a\x52\x65\x71\x75\x65\x73\x74\x2d\x44\x69\x73\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3a" \
+ "\x20\x4d\x44\x35\x38\x30\x20\x50\x72\x65\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x20\x46\x61" \
+ "\x69\x6c\x75\x72\x65\x70\x6c\x61\x63\x65\x73\x34\x32\x32\x20\x53\x65\x73\x73\x69\x6f\x6e" \
+ "\x20\x49\x6e\x74\x65\x72\x76\x61\x6c\x20\x54\x6f\x6f\x20\x53\x6d\x61\x6c\x6c\x6f\x63\x61" \
+ "\x6c\x31\x38\x31\x20\x43\x61\x6c\x6c\x20\x49\x73\x20\x42\x65\x69\x6e\x67\x20\x46\x6f\x72" \
+ "\x77\x61\x72\x64\x65\x64\x6f\x6d\x61\x69\x6e\x3d\x66\x61\x69\x6c\x75\x72\x65\x6e\x64\x65" \
+ "\x72\x65\x61\x6c\x6d\x3d\x53\x55\x42\x53\x43\x52\x49\x42\x45\x20\x70\x72\x65\x63\x6f\x6e" \
+ "\x64\x69\x74\x69\x6f\x6e\x6f\x72\x6d\x61\x6c\x69\x70\x73\x65\x63\x2d\x6d\x61\x6e\x64\x61" \
+ "\x74\x6f\x72\x79\x34\x31\x33\x20\x52\x65\x71\x75\x65\x73\x74\x20\x45\x6e\x74\x69\x74\x79" \
+ "\x20\x54\x6f\x6f\x20\x4c\x61\x72\x67\x65\x32\x65\x31\x38\x33\x20\x53\x65\x73\x73\x69\x6f" \
+ "\x6e\x20\x50\x72\x6f\x67\x72\x65\x73\x73\x63\x74\x70\x34\x38\x36\x20\x42\x75\x73\x79\x20" \
+ "\x48\x65\x72\x65\x6d\x6f\x74\x65\x72\x6d\x69\x6e\x61\x74\x65\x64\x41\x4b\x41\x76\x31\x2d" \
+ "\x4d\x44\x35\x2d\x73\x65\x73\x73\x69\x6f\x6e\x6f\x6e\x65\x0d\x0a\x41\x75\x74\x68\x6f\x72" \
+ "\x69\x7a\x61\x74\x69\x6f\x6e\x3a\x20\x36\x30\x33\x20\x44\x65\x63\x6c\x69\x6e\x65\x78\x74" \
+ "\x6e\x6f\x6e\x63\x65\x3d\x34\x38\x35\x20\x41\x6d\x62\x69\x67\x75\x6f\x75\x73\x65\x72\x6e" \
+ "\x61\x6d\x65\x3d\x61\x75\x64\x69\x6f\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70" \
+ "\x65\x3a\x20\x4d\x61\x72\x20\x0d\x0a\x52\x65\x63\x6f\x72\x64\x2d\x52\x6f\x75\x74\x65\x3a" \
+ "\x20\x4a\x75\x6c\x20\x34\x30\x31\x20\x55\x6e\x61\x75\x74\x68\x6f\x72\x69\x7a\x65\x64\x0d" \
+ "\x0a\x52\x65\x71\x75\x69\x72\x65\x3a\x20\x0d\x0a\x74\x3d\x30\x20\x30\x2e\x30\x2e\x30\x2e" \
+ "\x30\x0d\x0a\x53\x65\x72\x76\x65\x72\x3a\x20\x52\x45\x47\x49\x53\x54\x45\x52\x20\x0d\x0a" \
+ "\x63\x3d\x49\x4e\x20\x49\x50\x36\x20\x31\x38\x30\x20\x52\x69\x6e\x67\x69\x6e\x67\x31\x30" \
+ "\x30\x20\x54\x72\x79\x69\x6e\x67\x76\x3d\x30\x0d\x0a\x6f\x3d\x55\x50\x44\x41\x54\x45\x20" \
+ "\x4e\x4f\x54\x49\x46\x59\x20\x0d\x0a\x53\x75\x70\x70\x6f\x72\x74\x65\x64\x3a\x20\x75\x6e" \
+ "\x6b\x6e\x6f\x77\x6e\x41\x4d\x52\x54\x50\x2f\x41\x56\x50\x20\x0d\x0a\x50\x72\x69\x76\x61" \
+ "\x63\x79\x3a\x20\x0d\x0a\x53\x65\x63\x75\x72\x69\x74\x79\x2d\x0d\x0a\x45\x78\x70\x69\x72" \
+ "\x65\x73\x3a\x20\x0d\x0a\x61\x3d\x72\x74\x70\x6d\x61\x70\x3a\x0d\x0a\x6d\x3d\x76\x69\x64" \
+ "\x65\x6f\x20\x0d\x0a\x6d\x3d\x61\x75\x64\x69\x6f\x20\x0d\x0a\x73\x3d\x20\x66\x61\x6c\x73" \
+ "\x65\x0d\x0a\x61\x3d\x63\x6f\x6e\x66\x3a\x3b\x65\x78\x70\x69\x72\x65\x73\x3d\x0d\x0a\x52" \
+ "\x6f\x75\x74\x65\x3a\x20\x0d\x0a\x61\x3d\x66\x6d\x74\x70\x3a\x0d\x0a\x61\x3d\x63\x75\x72" \
+ "\x72\x3a\x43\x6c\x69\x65\x6e\x74\x3a\x20\x56\x65\x72\x69\x66\x79\x3a\x20\x0d\x0a\x61\x3d" \
+ "\x64\x65\x73\x3a\x0d\x0a\x52\x41\x63\x6b\x3a\x20\x0d\x0a\x52\x53\x65\x71\x3a\x20\x42\x59" \
+ "\x45\x20\x63\x6e\x6f\x6e\x63\x65\x3d\x31\x30\x30\x72\x65\x6c\x75\x72\x69\x3d\x71\x6f\x70" \
+ "\x3d\x54\x43\x50\x55\x44\x50\x71\x6f\x73\x78\x6d\x6c\x3b\x6c\x72\x0d\x0a\x56\x69\x61\x3a" \
+ "\x20\x53\x49\x50\x2f\x32\x2e\x30\x2f\x54\x43\x50\x20\x34\x30\x38\x20\x52\x65\x71\x75\x65" \
+ "\x73\x74\x20\x54\x69\x6d\x65\x6f\x75\x74\x69\x6d\x65\x72\x70\x73\x69\x70\x3a\x0d\x0a\x43" \
+ "\x6f\x6e\x74\x65\x6e\x74\x2d\x4c\x65\x6e\x67\x74\x68\x3a\x20\x4f\x63\x74\x20\x0d\x0a\x56" \
+ "\x69\x61\x3a\x20\x53\x49\x50\x2f\x32\x2e\x30\x2f\x55\x44\x50\x20\x3b\x63\x6f\x6d\x70\x3d" \
+ "\x73\x69\x67\x63\x6f\x6d\x70\x72\x6f\x62\x61\x74\x69\x6f\x6e\x61\x63\x6b\x3b\x62\x72\x61" \
+ "\x6e\x63\x68\x3d\x7a\x39\x68\x47\x34\x62\x4b\x0d\x0a\x4d\x61\x78\x2d\x46\x6f\x72\x77\x61" \
+ "\x72\x64\x73\x3a\x20\x41\x70\x72\x20\x53\x43\x54\x50\x52\x41\x43\x4b\x20\x49\x4e\x56\x49" \
+ "\x54\x45\x20\x0d\x0a\x43\x61\x6c\x6c\x2d\x49\x44\x3a\x20\x0d\x0a\x43\x6f\x6e\x74\x61\x63" \
+ "\x74\x3a\x20\x32\x30\x30\x20\x4f\x4b\x0d\x0a\x46\x72\x6f\x6d\x3a\x20\x0d\x0a\x43\x53\x65" \
+ "\x71\x3a\x20\x0d\x0a\x54\x6f\x3a\x20\x3b\x74\x61\x67\x3d\x04\x10\xdd\x10\x11\x31\x0d\x11" \
+ "\x0a\x07\x10\xb9\x0c\x10\xfe\x12\x10\xe1\x06\x11\x4e\x07\x11\x4e\x03\x11\x4a\x04\x11\x4a" \
+ "\x07\x10\xb2\x08\x11\x79\x06\x11\x81\x0f\x11\x22\x0b\x11\x55\x06\x11\x6b\x0b\x11\x60\x13" \
+ "\x10\xb2\x08\x11\x71\x05\x11\x87\x13\x10\xf7\x09\x0e\x8d\x08\x0d\xae\x0c\x10\xb9\x07\x10" \
+ "\x8e\x03\x0d\x96\x03\x10\x8a\x04\x10\x8a\x09\x0d\xd7\x0a\x0f\x12\x08\x0f\x8f\x09\x0f\x8f" \
+ "\x08\x0d\x6c\x06\x0e\x66\x09\x0e\x6c\x0a\x0e\x6c\x06\x0f\xc6\x07\x0f\xc6\x05\x11\x48\x06" \
+ "\x11\x48\x06\x0f\xbf\x07\x0f\xbf\x07\x0e\x55\x06\x0f\x16\x04\x0e\xf4\x03\x0e\xb1\x03\x10" \
+ "\xa6\x09\x10\x50\x03\x10\xa3\x0a\x0d\xb4\x05\x0e\x36\x06\x0e\xd6\x03\x0d\xf9\x11\x0e\xf8" \
+ "\x04\x0c\xd9\x08\x0e\xea\x04\x09\x53\x03\x0a\x4b\x04\x0e\xe4\x10\x0f\x35\x09\x0e\xe4\x08" \
+ "\x0d\x3f\x03\x0f\xe1\x0b\x10\x01\x03\x10\xac\x06\x10\x95\x0c\x0e\x76\x0b\x0f\xeb\x0a\x0f" \
+ "\xae\x05\x10\x2b\x04\x10\x2b\x08\x10\x7a\x10\x0f\x49\x07\x0f\xb8\x09\x10\x3e\x0b\x10\x0c" \
+ "\x07\x0f\x78\x0b\x0f\x6d\x09\x10\x47\x08\x10\x82\x0b\x0f\xf6\x08\x10\x62\x08\x0f\x87\x08" \
+ "\x10\x6a\x04\x0f\x78\x0d\x0f\xcd\x08\x0d\xae\x10\x0f\x5d\x0b\x0f\x98\x14\x0d\x20\x1b\x0d" \
+ "\x20\x04\x0d\xe0\x14\x0e\xb4\x0b\x0f\xa3\x0b\x07\x34\x0f\x0d\x56\x04\x0e\xf4\x03\x10\xaf" \
+ "\x07\x0d\x34\x09\x0f\x27\x04\x10\x9b\x04\x10\x9f\x09\x10\x59\x08\x10\x72\x09\x10\x35\x0a" \
+ "\x10\x21\x0a\x10\x17\x08\x0f\xe3\x03\x10\xa9\x05\x0c\xac\x04\x0c\xbd\x07\x0c\xc1\x08\x0c" \
+ "\xc1\x09\x0c\xf6\x10\x0c\x72\x0c\x0c\x86\x04\x0d\x64\x0c\x0c\xd5\x09\x0c\xff\x1b\x0b\xfc" \
+ "\x11\x0c\x5d\x13\x0c\x30\x09\x0c\xa4\x0c\x0c\x24\x0c\x0d\x3b\x03\x0d\x1a\x03\x0d\x1d\x16" \
+ "\x0c\x43\x09\x0c\x92\x09\x0c\x9b\x0d\x0e\xcb\x04\x0d\x16\x06\x0d\x10\x05\x04\xf2\x0b\x0c" \
+ "\xe1\x05\x0b\xde\x0a\x0c\xec\x13\x0b\xe3\x07\x0b\xd4\x08\x0d\x08\x0c\x0c\xc9\x09\x0c\x3a" \
+ "\x04\x0a\xe5\x0c\x0a\x23\x08\x0b\x3a\x0e\x09\xab\x0f\x0e\xfa\x09\x0f\x6f\x0c\x0a\x17\x0f" \
+ "\x09\x76\x0c\x0a\x5f\x17\x0d\xe2\x0f\x07\xa8\x0a\x0f\x85\x0f\x08\xd6\x0e\x09\xb9\x0b\x0a" \
+ "\x7a\x03\x0b\xdb\x03\x08\xc1\x04\x0e\xc7\x03\x08\xd3\x02\x04\x8d\x08\x0b\x4a\x05\x0b\x8c" \
+ "\x07\x0b\x61\x06\x05\x48\x04\x07\xf4\x05\x10\x30\x04\x07\x1e\x08\x07\x1e\x05\x0b\x91\x10" \
+ "\x04\xca\x09\x0a\x71\x09\x0e\x87\x05\x04\x98\x05\x0b\x6e\x0b\x04\x9b\x0f\x04\x9b\x07\x04" \
+ "\x9b\x03\x04\xa3\x07\x04\xa3\x10\x07\x98\x09\x07\x98\x05\x0b\x73\x05\x0b\x78\x05\x0b\x7d" \
+ "\x05\x07\xb9\x05\x0b\x82\x05\x0b\x87\x05\x0b\x1d\x05\x08\xe4\x05\x0c\x81\x05\x0f\x44\x05" \
+ "\x11\x40\x05\x08\x78\x05\x08\x9d\x05\x0f\x58\x05\x07\x3f\x05\x0c\x6d\x05\x10\xf2\x05\x0c" \
+ "\x58\x05\x06\xa9\x04\x07\xb6\x09\x05\x8c\x06\x06\x1a\x06\x0e\x81\x0a\x06\x16\x0a\x0a\xc4" \
+ "\x07\x0b\x5a\x0a\x0a\xba\x03\x0b\x1b\x04\x11\x45\x06\x0c\x8c\x07\x05\xad\x0a\x0e\xda\x08" \
+ "\x0b\x42\x0d\x09\xf7\x0b\x05\x1c\x09\x11\x16\x08\x05\xc9\x07\x0d\x86\x06\x0b\xcf\x0a\x06" \
+ "\x4d\x04\x0b\xa2\x06\x06\x8d\x08\x05\xe6\x08\x0e\x11\x0b\x0a\x9b\x03\x0a\x04\x03\x0b\xb5" \
+ "\x05\x10\xd7\x04\x09\x94\x05\x0a\xe2\x03\x0b\xb2\x06\x0d\x67\x04\x0d\x11\x08\x08\xb7\x1b" \
+ "\x0e\x3b\x0a\x09\xa1\x14\x04\x85\x15\x07\x83\x15\x07\x6e\x0d\x09\x3d\x17\x06\xae\x0f\x07" \
+ "\xe6\x14\x07\xbe\x0d\x06\x0a\x0d\x09\x30\x16\x06\xf2\x12\x08\x1e\x21\x04\xaa\x13\x10\xc5" \
+ "\x08\x0a\x0f\x1c\x0e\x96\x18\x0b\xb8\x1a\x05\x95\x1a\x05\x75\x11\x06\x3d\x16\x06\xdc\x1e" \
+ "\x0e\x19\x16\x05\xd1\x1d\x06\x20\x23\x05\x27\x11\x08\x7d\x11\x0d\x99\x16\x04\xda\x0d\x0f" \
+ "\x1c\x16\x07\x08\x17\x05\xb4\x0d\x08\xc7\x13\x07\xf8\x12\x08\x57\x1f\x04\xfe\x19\x05\x4e" \
+ "\x13\x08\x0b\x0f\x08\xe9\x17\x06\xc5\x13\x06\x7b\x19\x05\xf1\x15\x07\x44\x18\x0d\xfb\x0b" \
+ "\x0f\x09\x1b\x0d\xbe\x12\x08\x30\x15\x07\x59\x04\x0b\xa6\x04\x0b\xae\x04\x0b\x9e\x04\x0b" \
+ "\x96\x04\x0b\x9a\x0a\x0a\xb0\x0b\x0a\x90\x08\x0b\x32\x0b\x09\x6b\x08\x0b\x2a\x0b\x0a\x85" \
+ "\x09\x0b\x12\x0a\x0a\xa6\x0d\x09\xea\x13\x0d\x74\x14\x07\xd2\x13\x09\x0b\x12\x08\x42\x10" \
+ "\x09\x5b\x12\x09\x1e\x0d\x0c\xb1\x0e\x0c\x17\x11\x09\x4a\x0c\x0a\x53\x0c\x0a\x47\x09\x0a" \
+ "\xf7\x0e\x09\xc7\x0c\x0a\x3b\x07\x06\x69\x08\x06\x69\x06\x09\xe3\x08\x0b\x52\x0a\x0a\xd8" \
+ "\x12\x06\x57\x0d\x06\x57\x07\x09\xe3\x04\x0a\xe9\x10\x07\x30\x09\x0b\x00\x0c\x0a\x2f\x05" \
+ "\x0a\xe9\x05\x0a\x6b\x06\x0a\x6b\x0a\x0a\xce\x09\x0a\xee\x03\x0b\xdb\x07\x0f\x7e\x0a\x09" \
+ "\x97\x0a\x06\x71\x0e\x09\xd5\x17\x06\x93\x07\x0e\x5c\x07\x0f\xda\x0a\x0f\x35\x0d\x0d\xec" \
+ "\x0a\x09\x97\x0a\x06\x71\x08\x0b\x22\x0f\x09\x85\x06\x0b\x68\x0c\x0d\x4a\x09\x0b\x09\x13" \
+ "\x08\xf8\x15\x08\xa2\x04\x0b\xaa\x0f\x05\x66\x0d\x07\x23\x09\x0a\x06\x0b\x0d\x4a\x0f\x04" \
+ "\xee\x06\x04\xf8\x04\x09\x2b\x04\x08\x53\x07\x08\xc0\x03\x11\x1f\x04\x11\x1e\x07\x0d\x8c" \
+ "\x03\x07\x34\x04\x10\xdb\x03\x07\x36\x03\x0d\xa9\x0d\x04\x20\x0b\x04\x51\x0c\x04\x3a\x04" \
+ "\x0b\xb8\x04\x0c\x24\x04\x05\x95\x04\x04\x7c\x04\x05\x75\x04\x04\x85\x04\x09\x6b\x04\x06" \
+ "\x3d\x06\x04\x7b\x04\x06\xdc\x04\x07\x83\x04\x0e\x19\x12\x04\x00\x10\x08\x8e\x10\x08\x69" \
+ "\x0e\x04\x12\x0d\x04\x2d\x03\x10\xb9\x04\x05\xd1\x04\x07\x6e\x04\x06\x20\x07\x04\x74\x04" \
+ "\x0b\xfc\x0a\x04\x5c\x04\x05\x27\x04\x09\x3d\x04\x08\x7d\x04\x0f\xae\x04\x0d\x99\x04\x06" \
+ "\xae\x04\x04\xda\x09\x04\x09\x08\x11\x22\x04\x0f\x1c\x04\x07\xe6\x04\x0e\xcb\x05\x08\xbd" \
+ "\x04\x07\x08\x04\x0f\xa3\x04\x06\x57\x04\x05\xb4\x04\x0f\x5d\x04\x08\xc7\x08\x0b\xf4\x04" \
+ "\x07\xf8\x04\x07\x30\x04\x07\xbe\x04\x08\x57\x05\x0d\x46\x04\x04\xfe\x04\x06\x0a\x04\x05" \
+ "\x4e\x04\x0e\x3b\x04\x08\x0b\x04\x09\x30\x04\x08\xe9\x05\x05\xee\x04\x06\xc5\x04\x06\xf2" \
+ "\x04\x06\x7b\x04\x09\xa1\x04\x05\xf1\x04\x08\x1e\x04\x07\x44\x04\x0b\xdd\x04\x0d\xfb\x04" \
+ "\x04\xaa\x04\x0b\xe3\x07\x0e\xee\x04\x0f\x09\x04\x0e\xb4\x04\x0d\xbe\x04\x10\xc5\x04\x08" \
+ "\x30\x05\x0f\x30\x04\x07\x59\x04\x0a\x0f\x06\x0e\x61\x04\x04\x81\x04\x0d\xab\x04\x0d\x93" \
+ "\x04\x11\x6b\x04\x0e\x96\x05\x04\x66\x09\x04\x6b\x0b\x04\x46\x04\x0c\xe1"
+
+TCOMP_END_DECLS
+
+#endif /* _TINYSIGCOMPP_RFC3485_H_ */
+
diff --git a/tinySIGCOMP/src/tcomp_rfc5049_sip.h b/tinySIGCOMP/src/tcomp_rfc5049_sip.h
new file mode 100644
index 0000000..6cdab8a
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_rfc5049_sip.h
@@ -0,0 +1,54 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_rfc5049_sip.h
+ * @brief RFC 5049 - Applying Signaling Compression (SigComp) to the Session Initiation Protocol (SIP)
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSIGCOMPP_RFC5049_H_
+#define _TINYSIGCOMPP_RFC5049_H_
+
+/*****
+Applying Signaling Compression (SigComp)
+ to the Session Initiation Protocol (SIP)
+*****/
+/** 4.1. decompression_memory_size (DMS) for SIP/SigComp*/
+#define SIP_RFC5049_DECOMPRESSION_MEMORY_SIZE 8192
+
+/** 4.2. state_memory_size (SMS) for SIP/SigComp (per compartment) */
+#define SIP_RFC5049_STATE_MEMORY_SIZE 2048
+
+/** 4.3. cycles_per_bit (CPB) for SIP/SigComp */
+#define SIP_RFC5049_CYCLES_PER_BIT 16
+
+/** 4.4. SigComp_version (SV) for SIP/SigComp */
+#define SIP_RFC5049_SIGCOMP_VERSION 0x02 // (at least SigComp + NACK)
+
+// 4.5. locally available state (LAS) for SIP/SigComp
+// Minimum LAS for SIP/SigComp: the SIP/SDP static dictionary as defined
+ //in [RFC3485].
+
+#endif /* _TINYSIGCOMPP_RFC5049_H_ */
diff --git a/tinySIGCOMP/src/tcomp_rfc5112_dictionary_presence.h b/tinySIGCOMP/src/tcomp_rfc5112_dictionary_presence.h
new file mode 100644
index 0000000..c7481cb
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_rfc5112_dictionary_presence.h
@@ -0,0 +1,209 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_rfc3485_dictionary_sip.h
+ * @brief RFC 3485 - The Session Initiation Protocol (SIP) and Session Description Protocol
+ * (SDP) Static Dictionary for Signaling Compression (SigComp)
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSIGCOMPP_RFC5112_H_
+#define _TINYSIGCOMPP_RFC5112_H_
+
+TCOMP_BEGIN_DECLS
+
+#define RFC5112_DICTIONARY_PRESENCE_VALUE_LENGTH 0x0d93
+#define RFC5112_DICTIONARY_PRESENCE_STATE_ADDRESS 0 /*(not relevant for the dictionary) */
+#define RFC5112_DICTIONARY_PRESENCE_STATE_INSTRUCTION 0 /*(not relevant for the dictionary) */
+#define RFC5112_DICTIONARY_PRESENCE_MINIMUM_ACCESS_LENGTH 6
+
+#define RFC5112_DICTIONARY_PRESENCE_IDENTIFIER_LENGTH 20
+
+#define RFC5112_DICTIONARY_PRESENCE_IDENTIFIER \
+ "\xd9\x42\x29\x7d\x0b\xb3\x8f\xc0\x1d\x67\x41\xd6\xb3\xb4\x81\x57\xac\x8e\x1b\xe0"
+
+#define RFC5112_DICTIONARY_PRESENCE_VALUE \
+ "\x63\x6f\x6e\x76\x65\x6e\x74\x69\x6f\x6e\x2d\x63\x65\x6e\x74\x65\x72\x6d\x69\x6e\x61\x74" \
+ "\x65\x64\x65\x70\x72\x65\x73\x73\x65\x64\x69\x73\x67\x75\x73\x74\x65\x64\x69\x6e\x64\x75" \
+ "\x73\x74\x72\x69\x61\x6c\x61\x73\x74\x2d\x69\x6e\x70\x75\x74\x3d\x68\x75\x6d\x69\x6c\x69" \
+ "\x61\x74\x65\x64\x6f\x6d\x61\x69\x6e\x3d\x61\x75\x74\x6f\x6d\x6f\x62\x69\x6c\x65\x63\x75" \
+ "\x72\x69\x6f\x75\x73\x70\x69\x72\x69\x74\x73\x2d\x49\x4e\x44\x50\x73\x65\x6e\x64\x2d\x6f" \
+ "\x6e\x6c\x79\x70\x61\x74\x68\x65\x61\x74\x65\x72\x65\x73\x74\x6c\x65\x73\x73\x6c\x65\x65" \
+ "\x70\x79\x69\x6e\x2d\x70\x65\x72\x73\x6f\x6e\x61\x6c\x6f\x6e\x65\x6c\x79\x70\x6c\x61\x79" \
+ "\x66\x75\x6c\x6f\x77\x65\x72\x74\x68\x61\x6e\x6e\x6f\x79\x65\x64\x75\x6e\x63\x6f\x6d\x66" \
+ "\x6f\x72\x74\x61\x62\x6c\x65\x78\x63\x6c\x75\x64\x65\x3d\x63\x6f\x6e\x66\x75\x73\x65\x64" \
+ "\x76\x61\x63\x61\x74\x69\x6f\x6e\x63\x6c\x75\x62\x75\x73\x2d\x73\x74\x61\x74\x69\x6f\x6e" \
+ "\x61\x69\x72\x63\x72\x61\x66\x74\x68\x69\x72\x73\x74\x79\x63\x6f\x75\x72\x69\x65\x72\x65" \
+ "\x6a\x65\x63\x74\x65\x64\x68\x69\x73\x74\x69\x6e\x66\x6f\x66\x66\x69\x63\x65\x72\x65\x6d" \
+ "\x6f\x76\x65\x3d\x61\x72\x65\x6e\x61\x62\x6c\x65\x64\x3d\x52\x45\x46\x45\x52\x45\x47\x49" \
+ "\x53\x54\x45\x52\x77\x61\x69\x74\x69\x6e\x67\x72\x75\x6d\x70\x79\x70\x72\x65\x66\x69\x78" \
+ "\x3d\x68\x61\x6c\x66\x72\x65\x69\x67\x68\x74\x6d\x65\x61\x6e\x67\x72\x79\x53\x55\x42\x53" \
+ "\x43\x52\x49\x42\x45\x70\x72\x6f\x76\x61\x74\x69\x6f\x6e\x69\x6e\x63\x6c\x75\x64\x65\x3d" \
+ "\x61\x70\x70\x72\x6f\x76\x65\x64\x68\x6f\x6c\x69\x64\x61\x79\x75\x6e\x6b\x6e\x6f\x77\x6e" \
+ "\x70\x61\x72\x6b\x69\x6e\x67\x4d\x45\x53\x53\x41\x47\x45\x77\x6f\x72\x72\x69\x65\x64\x68" \
+ "\x75\x6d\x62\x6c\x65\x64\x61\x69\x72\x70\x6f\x72\x74\x61\x73\x68\x61\x6d\x65\x64\x70\x6c" \
+ "\x61\x79\x69\x6e\x67\x50\x55\x42\x4c\x49\x53\x48\x68\x75\x6e\x67\x72\x79\x63\x72\x61\x6e" \
+ "\x6b\x79\x61\x6d\x61\x7a\x65\x64\x61\x66\x72\x61\x69\x64\x55\x50\x44\x41\x54\x45\x4e\x4f" \
+ "\x54\x49\x46\x59\x49\x4e\x56\x49\x54\x45\x43\x41\x4e\x43\x45\x4c\x66\x72\x69\x65\x6e\x64" \
+ "\x70\x6f\x73\x74\x61\x6c\x66\x61\x6d\x69\x6c\x79\x70\x72\x69\x73\x6f\x6e\x69\x6e\x5f\x61" \
+ "\x77\x65\x62\x72\x61\x76\x65\x71\x75\x69\x65\x74\x62\x6f\x72\x65\x64\x50\x52\x41\x43\x4b" \
+ "\x70\x72\x6f\x75\x64\x66\x69\x78\x65\x64\x68\x6f\x74\x65\x6c\x68\x61\x70\x70\x79\x63\x61" \
+ "\x66\x65\x63\x69\x64\x3d\x62\x61\x6e\x6b\x6d\x69\x6e\x3d\x61\x77\x61\x79\x6d\x61\x78\x3d" \
+ "\x6d\x65\x61\x6c\x62\x75\x73\x79\x77\x6f\x72\x6b\x75\x72\x6e\x3d\x63\x6f\x6c\x64\x68\x75" \
+ "\x72\x74\x6a\x65\x61\x6c\x6f\x75\x73\x70\x69\x72\x69\x74\x73\x2d\x75\x73\x65\x72\x2d\x70" \
+ "\x72\x6f\x67\x6f\x76\x65\x72\x6e\x6d\x65\x6e\x74\x72\x61\x69\x6e\x2d\x73\x74\x61\x74\x69" \
+ "\x6f\x6e\x6f\x72\x65\x66\x65\x72\x73\x75\x62\x73\x63\x72\x69\x62\x65\x66\x6f\x72\x65\x74" \
+ "\x72\x61\x6e\x73\x6d\x69\x73\x73\x69\x6f\x6e\x2d\x61\x6c\x6c\x6f\x77\x65\x64\x75\x72\x61" \
+ "\x74\x69\x6f\x6e\x2d\x73\x75\x62\x73\x63\x72\x69\x62\x65\x64\x3d\x68\x69\x67\x68\x65\x72" \
+ "\x74\x68\x61\x6e\x78\x69\x6f\x75\x73\x65\x72\x76\x69\x63\x65\x2d\x64\x65\x73\x63\x72\x69" \
+ "\x70\x74\x69\x6f\x6e\x3d\x62\x72\x65\x61\x6b\x66\x61\x73\x74\x61\x64\x69\x75\x6d\x73\x67" \
+ "\x2d\x74\x61\x6b\x65\x72\x65\x6d\x6f\x72\x73\x65\x66\x75\x6c\x6c\x3a\x63\x69\x76\x69\x63" \
+ "\x4c\x6f\x63\x6f\x6e\x66\x65\x72\x65\x6e\x63\x65\x71\x75\x61\x6c\x73\x74\x72\x65\x73\x73" \
+ "\x65\x64\x77\x61\x74\x65\x72\x63\x72\x61\x66\x74\x65\x72\x61\x6e\x67\x65\x3a\x62\x61\x73" \
+ "\x69\x63\x50\x6f\x6c\x69\x63\x79\x63\x6c\x65\x63\x6f\x75\x6e\x74\x72\x79\x63\x68\x61\x6e" \
+ "\x67\x65\x64\x75\x6e\x74\x69\x6c\x3d\x61\x64\x64\x65\x64\x75\x72\x69\x3d\x77\x68\x61\x74" \
+ "\x70\x65\x72\x6d\x61\x6e\x65\x6e\x74\x2d\x61\x62\x73\x65\x6e\x63\x65\x6d\x62\x61\x72\x72" \
+ "\x61\x73\x73\x65\x64\x65\x61\x63\x74\x69\x76\x61\x74\x65\x64\x69\x73\x74\x72\x61\x63\x74" \
+ "\x65\x64\x69\x6e\x6e\x65\x72\x76\x6f\x75\x73\x65\x6c\x66\x69\x6c\x74\x65\x72\x65\x6c\x69" \
+ "\x65\x76\x65\x64\x66\x6c\x69\x72\x74\x61\x74\x69\x6f\x75\x73\x61\x67\x65\x2d\x72\x75\x6c" \
+ "\x65\x73\x65\x72\x76\x63\x61\x70\x73\x70\x68\x65\x72\x65\x67\x69\x73\x74\x72\x61\x74\x69" \
+ "\x6f\x6e\x2d\x73\x74\x61\x74\x65\x3d\x62\x61\x72\x72\x69\x6e\x67\x2d\x73\x74\x61\x74\x65" \
+ "\x78\x74\x65\x72\x6e\x61\x6c\x2d\x72\x75\x6c\x65\x73\x65\x74\x69\x6d\x65\x2d\x6f\x66\x66" \
+ "\x73\x65\x74\x64\x69\x61\x6c\x6f\x67\x69\x6e\x5f\x6c\x6f\x76\x65\x72\x72\x69\x64\x69\x6e" \
+ "\x67\x2d\x77\x69\x6c\x6c\x69\x6e\x67\x6e\x65\x73\x73\x70\x65\x63\x74\x61\x74\x6f\x72\x65" \
+ "\x73\x69\x64\x65\x6e\x63\x65\x76\x65\x6e\x74\x2d\x70\x61\x63\x6b\x61\x67\x65\x73\x75\x70" \
+ "\x65\x72\x76\x69\x73\x6f\x72\x65\x73\x74\x61\x75\x72\x61\x6e\x74\x72\x75\x63\x6b\x70\x6c" \
+ "\x6d\x6f\x62\x69\x6c\x69\x74\x79\x6a\x6f\x69\x6e\x61\x70\x70\x72\x6f\x70\x72\x69\x61\x74" \
+ "\x65\x76\x65\x6e\x74\x6c\x69\x73\x74\x65\x65\x72\x69\x6e\x67\x69\x76\x65\x75\x70\x72\x69" \
+ "\x6e\x63\x69\x70\x61\x6c\x61\x6e\x67\x75\x61\x67\x65\x73\x63\x68\x65\x6d\x65\x73\x73\x61" \
+ "\x67\x65\x2d\x73\x75\x6d\x6d\x61\x72\x79\x70\x6c\x61\x63\x65\x2d\x6f\x66\x2d\x77\x6f\x72" \
+ "\x73\x68\x69\x70\x6c\x61\x63\x65\x2d\x74\x79\x70\x65\x3d\x3a\x74\x69\x6d\x65\x64\x2d\x73" \
+ "\x74\x61\x74\x75\x73\x2d\x69\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x69\x6f\x6e\x65\x75\x74" \
+ "\x72\x61\x6c\x49\x4e\x46\x4f\x50\x54\x49\x4f\x4e\x53\x69\x65\x6d\x65\x6e\x73\x2d\x52\x54" \
+ "\x50\x2d\x53\x74\x61\x74\x73\x65\x72\x76\x69\x63\x65\x2d\x69\x64\x6c\x65\x2d\x74\x68\x72" \
+ "\x65\x73\x68\x6f\x6c\x64\x3d\x70\x75\x62\x6c\x69\x63\x2d\x74\x72\x61\x6e\x73\x70\x6f\x72" \
+ "\x74\x6f\x6f\x62\x72\x69\x67\x68\x74\x72\x69\x67\x67\x65\x72\x65\x73\x6f\x75\x72\x63\x65" \
+ "\x3d\x3a\x67\x65\x6f\x70\x72\x69\x76\x31\x30\x30\x72\x65\x6c\x61\x74\x69\x6f\x6e\x73\x68" \
+ "\x69\x70\x6f\x63\x2d\x73\x65\x74\x74\x69\x6e\x67\x73\x75\x72\x70\x72\x69\x73\x65\x64\x61" \
+ "\x72\x6b\x75\x72\x6e\x3a\x6f\x6d\x61\x3a\x78\x6d\x6c\x3a\x70\x72\x73\x3a\x70\x69\x64\x66" \
+ "\x3a\x6f\x6d\x61\x2d\x70\x72\x65\x73\x65\x6e\x74\x61\x74\x69\x6f\x6e\x6f\x69\x73\x79\x3a" \
+ "\x73\x69\x6d\x70\x6c\x65\x2d\x66\x69\x6c\x74\x65\x72\x2d\x73\x65\x74\x69\x6d\x65\x6f\x75" \
+ "\x74\x64\x6f\x6f\x72\x73\x63\x68\x6f\x6f\x6c\x70\x61\x72\x74\x69\x61\x6c\x6f\x63\x61\x74" \
+ "\x69\x6f\x6e\x2d\x69\x6e\x66\x6f\x72\x6d\x61\x74\x69\x6f\x6e\x61\x6d\x65\x65\x74\x69\x6e" \
+ "\x67\x63\x61\x6c\x6d\x65\x74\x68\x6f\x64\x73\x74\x6f\x72\x65\x74\x65\x6e\x74\x69\x6f\x6e" \
+ "\x2d\x65\x78\x70\x69\x72\x79\x3a\x77\x61\x74\x63\x68\x65\x72\x69\x6e\x66\x6f\x66\x66\x65" \
+ "\x6e\x64\x65\x64\x63\x6f\x6e\x74\x72\x6f\x6c\x6f\x6f\x6b\x69\x6e\x67\x2d\x66\x6f\x72\x2d" \
+ "\x77\x6f\x72\x6b\x69\x6e\x67\x77\x61\x74\x63\x68\x65\x72\x2d\x6c\x69\x73\x74\x72\x65\x65" \
+ "\x74\x70\x6c\x61\x63\x65\x2d\x69\x73\x66\x6f\x63\x75\x73\x6f\x75\x6e\x64\x65\x72\x77\x61" \
+ "\x79\x68\x6f\x6d\x65\x70\x61\x67\x65\x70\x72\x69\x76\x61\x63\x79\x77\x61\x72\x65\x68\x6f" \
+ "\x75\x73\x65\x72\x2d\x69\x6e\x70\x75\x74\x72\x61\x76\x65\x6c\x62\x6f\x74\x68\x65\x72\x65" \
+ "\x63\x65\x69\x76\x65\x2d\x6f\x6e\x6c\x79\x3a\x72\x6c\x6d\x69\x6e\x76\x61\x6c\x75\x65\x3d" \
+ "\x3a\x63\x61\x70\x73\x6c\x65\x65\x70\x69\x6e\x67\x75\x69\x6c\x74\x79\x69\x6e\x76\x69\x6e" \
+ "\x63\x69\x62\x6c\x65\x76\x65\x6e\x74\x3d\x6d\x6f\x6f\x64\x79\x70\x61\x63\x6b\x61\x67\x65" \
+ "\x3d\x70\x72\x69\x6f\x72\x69\x74\x79\x76\x69\x64\x65\x6f\x66\x72\x6f\x6d\x3d\x61\x75\x64" \
+ "\x69\x6f\x63\x61\x72\x64\x70\x6f\x73\x3d\x61\x75\x74\x6f\x6d\x61\x74\x61\x70\x70\x6c\x69" \
+ "\x63\x61\x74\x69\x6f\x6e\x6f\x74\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x65\x76\x69\x63\x65" \
+ "\x49\x44\x69\x6d\x70\x72\x65\x73\x73\x65\x64\x69\x73\x61\x70\x70\x6f\x69\x6e\x74\x65\x64" \
+ "\x6e\x6f\x74\x65\x2d\x77\x65\x6c\x6c\x69\x62\x72\x61\x72\x79\x3a\x64\x61\x74\x61\x2d\x6d" \
+ "\x6f\x64\x65\x6c\x65\x63\x74\x72\x6f\x6e\x69\x63\x69\x76\x69\x63\x41\x64\x64\x72\x65\x73" \
+ "\x73\x61\x72\x63\x61\x73\x74\x69\x63\x6f\x6e\x74\x65\x6e\x74\x65\x64\x69\x6e\x64\x69\x67" \
+ "\x6e\x61\x6e\x74\x69\x6d\x65\x72\x65\x70\x6c\x61\x63\x65\x73\x68\x6f\x63\x6b\x65\x64\x63" \
+ "\x6c\x61\x73\x73\x69\x73\x74\x61\x6e\x74\x69\x6d\x65\x73\x74\x61\x6d\x70\x72\x6f\x76\x69" \
+ "\x64\x65\x64\x2d\x62\x79\x3a\x63\x69\x70\x69\x64\x66\x2d\x66\x75\x6c\x6c\x53\x74\x61\x74" \
+ "\x65\x3d\x61\x63\x74\x6f\x72\x65\x6d\x6f\x76\x65\x64\x62\x75\x73\x69\x6e\x65\x73\x73\x65" \
+ "\x72\x69\x6f\x75\x73\x65\x6c\x3d\x3a\x73\x63\x68\x65\x6d\x61\x78\x76\x61\x6c\x75\x65\x3d" \
+ "\x3a\x72\x70\x69\x64\x75\x72\x6e\x3a\x69\x65\x74\x66\x3a\x70\x61\x72\x61\x6d\x73\x3a\x78" \
+ "\x6d\x6c\x2d\x70\x61\x74\x63\x68\x2d\x6f\x70\x73\x65\x63\x2d\x61\x67\x72\x65\x65\x61\x72" \
+ "\x6c\x79\x2d\x73\x65\x73\x73\x69\x6f\x6e\x2d\x70\x61\x74\x69\x63\x69\x70\x61\x74\x69\x6f" \
+ "\x6e\x2d\x74\x68\x65\x2d\x70\x68\x6f\x6e\x65\x74\x77\x6f\x72\x6b\x2d\x61\x76\x61\x69\x6c" \
+ "\x61\x62\x69\x6c\x69\x74\x79\x70\x65\x72\x66\x6f\x72\x6d\x61\x6e\x63\x65\x78\x63\x69\x74" \
+ "\x65\x64\x70\x72\x65\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x6f\x72\x65\x73\x6f\x75\x72\x63" \
+ "\x65\x2d\x70\x72\x69\x6f\x72\x69\x74\x79\x3d\x66\x61\x6c\x73\x65\x72\x76\x69\x63\x65\x2d" \
+ "\x63\x6c\x61\x73\x73\x72\x6f\x6f\x6d\x75\x73\x74\x55\x6e\x64\x65\x72\x73\x74\x61\x6e\x64" \
+ "\x69\x73\x70\x6c\x61\x79\x2d\x6e\x61\x6d\x65\x3d\x69\x6e\x73\x74\x61\x6e\x63\x65\x78\x74" \
+ "\x65\x6e\x73\x69\x6f\x6e\x73\x2d\x62\x69\x6e\x64\x69\x6e\x67\x73\x64\x70\x2d\x61\x6e\x61" \
+ "\x74\x74\x65\x6e\x64\x61\x6e\x74\x72\x75\x65\x3a\x70\x69\x64\x66\x2d\x64\x69\x66\x66\x72" \
+ "\x75\x73\x74\x72\x61\x74\x65\x64\x75\x70\x6c\x65\x78\x70\x69\x72\x61\x74\x69\x6f\x6e\x3d" \
+ "\x63\x6f\x6e\x74\x61\x63\x74\x69\x76\x69\x74\x69\x65\x73\x68\x6f\x70\x70\x69\x6e\x67\x2d" \
+ "\x61\x72\x65\x61\x73\x6f\x6e\x3d\x61\x70\x70\x6f\x69\x6e\x74\x6d\x65\x6e\x74\x69\x74\x79" \
+ "\x3d\x61\x73\x73\x6f\x63\x69\x61\x74\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x69\x6e\x74\x65" \
+ "\x72\x65\x73\x74\x65\x64\x65\x76\x63\x61\x70\x73\x74\x61\x74\x75\x73\x3d\x61\x63\x74\x69" \
+ "\x76\x65\x72\x73\x69\x6f\x6e\x3d\x77\x69\x6e\x66\x6f\x70\x65\x6e\x64\x69\x6e\x67\x69\x6e" \
+ "\x2d\x74\x72\x61\x6e\x73\x69\x74\x75\x70\x6c\x65\x68\x6f\x73\x70\x69\x74\x61\x6c\x61\x6e" \
+ "\x67\x3d\x3c\x3f\x78\x6d\x6c\x6e\x73\x3d\x73\x69\x63\x6b\x70\x72\x65\x73\x65\x6e\x63\x65" \
+ "\x55\x54\x46\x2d\x38\x3f\x3e\x63\x6c\x6f\x73\x65\x64\x05\x0d\x34\x08\x0d\x06\x09\x0c\xe3" \
+ "\x07\x0d\x48\x06\x0d\x36\x13\x0b\xab\x05\x09\x65\x07\x0c\xd4\x08\x0d\x40\x05\x0d\x23\x05" \
+ "\x0c\x35\x07\x0c\xae\x05\x0d\x2f\x06\x08\xb9\x05\x07\x2b\x04\x0d\x12\x06\x0d\x4f\x09\x0c" \
+ "\x2c\x04\x0c\x89\x04\x0a\xf6\x09\x0b\x57\x0b\x0b\x05\x08\x0a\xda\x06\x0a\xda\x06\x04\x89" \
+ "\x05\x0b\xa6\x04\x0b\x94\x06\x05\x05\x07\x0b\x3f\x0e\x0b\xba\x07\x0b\x98\x0a\x0c\x8d\x09" \
+ "\x0b\x6d\x09\x0c\x8e\x0e\x0c\x48\x0a\x0c\xb2\x1d\x09\x56\x0d\x0c\x38\x06\x07\xba\x0b\x08" \
+ "\xb9\x0b\x07\xec\x06\x0d\x02\x0a\x0a\x46\x04\x08\xf4\x06\x0b\x6a\x04\x0a\xb6\x0c\x0c\x55" \
+ "\x08\x0a\x31\x04\x0a\x92\x08\x0a\x1b\x05\x0a\xb1\x04\x08\xc0\x05\x0a\x27\x05\x0a\xa7\x05" \
+ "\x0a\xac\x04\x0a\xba\x04\x07\xdc\x05\x08\xad\x0a\x09\x29\x0a\x08\xa7\x05\x0a\x56\x05\x0b" \
+ "\x4d\x07\x09\x2a\x0d\x09\xa7\x0b\x07\xa9\x06\x09\xc6\x0b\x0b\x5f\x0c\x09\xdf\x0b\x09\xe0" \
+ "\x06\x07\xcb\x0c\x0a\x0b\x09\x09\x20\x08\x0a\x97\x07\x09\xe0\x07\x0c\xfb\x06\x0a\x8c\x0e" \
+ "\x09\x7f\x0a\x09\x87\x0b\x0c\x71\x0a\x0c\x71\x06\x07\x93\x05\x0a\x66\x04\x08\x67\x04\x09" \
+ "\xba\x08\x09\x20\x0a\x0b\x72\x05\x0a\x72\x08\x07\xb3\x0b\x0a\xc5\x07\x09\xf2\x07\x08\x89" \
+ "\x04\x08\xad\x08\x0a\xbe\x06\x0c\x9f\x0b\x06\xd0\x0e\x08\x26\x08\x0a\x9f\x07\x09\xc6\x0a" \
+ "\x0c\x69\x07\x08\x85\x05\x0b\x7c\x07\x0a\x39\x0c\x09\x34\x07\x0a\x21\x09\x08\x7d\x07\x0c" \
+ "\xf5\x0b\x0c\xa3\x14\x06\xa6\x0d\x08\xb2\x0c\x07\x2a\x0c\x08\xb3\x04\x07\x56\x07\x09\x1a" \
+ "\x04\x07\x52\x07\x07\x40\x05\x07\x4d\x07\x0b\x80\x06\x07\x47\x16\x06\x91\x08\x0c\x62\x10" \
+ "\x09\xcf\x10\x07\xdd\x09\x0a\xf6\x09\x06\xfc\x0c\x0b\x17\x07\x07\x39\x04\x06\xf8\x07\x09" \
+ "\xa1\x06\x06\x8d\x05\x07\x21\x04\x0a\x55\x09\x0a\xd2\x0c\x0a\xcf\x13\x06\xc8\x0a\x08\xec" \
+ "\x07\x0d\x06\x0b\x08\x0c\x14\x0b\xd5\x12\x07\xbe\x0d\x07\xd1\x16\x08\x01\x14\x0b\xf1\x06" \
+ "\x05\xb4\x07\x04\x56\x09\x04\x17\x0c\x0a\xea\x09\x04\x1f\x0a\x07\x7e\x0b\x07\x6a\x07\x0c" \
+ "\x0f\x0b\x07\xa0\x0a\x0c\x96\x06\x05\x28\x06\x0a\x7d\x05\x06\x1f\x07\x05\x8b\x0a\x04\x3c" \
+ "\x06\x05\xae\x04\x06\x50\x09\x0a\xe2\x06\x05\xf6\x07\x07\xfd\x09\x0b\x33\x0a\x0c\xec\x0a" \
+ "\x0a\x83\x07\x06\x54\x06\x04\x90\x04\x05\x3f\x05\x0a\x92\x07\x07\x8a\x07\x08\xcc\x08\x09" \
+ "\xea\x07\x04\x96\x05\x06\x10\x08\x07\x98\x0a\x06\xf1\x08\x04\x79\x09\x0b\x22\x07\x0b\x8e" \
+ "\x07\x0b\x46\x04\x0d\x3c\x06\x04\x80\x08\x07\x12\x09\x09\x4a\x07\x04\xe3\x07\x05\x84\x05" \
+ "\x09\x7a\x05\x06\x01\x09\x09\x12\x04\x09\x52\x0d\x04\xaa\x0d\x08\x56\x08\x04\xdc\x07\x05" \
+ "\x92\x05\x05\x0c\x0a\x04\x4c\x04\x06\x2c\x0b\x04\xd1\x04\x06\x24\x09\x0c\x40\x04\x04\xce" \
+ "\x0c\x08\xc1\x11\x04\x00\x05\x07\x34\x0a\x06\x6a\x08\x0d\x28\x05\x06\x1a\x0a\x04\x28\x07" \
+ "\x0a\xfe\x06\x04\xff\x08\x09\x94\x07\x05\x76\x10\x08\x98\x06\x05\xf0\x06\x09\x03\x10\x09" \
+ "\x03\x09\x08\x1e\x0a\x08\x3c\x06\x09\x9b\x0d\x0c\xbb\x07\x06\xe3\x05\x09\xcc\x06\x0a\x15" \
+ "\x07\x04\x73\x05\x06\x73\x0d\x06\x73\x05\x08\x45\x08\x0a\x29\x09\x0a\x40\x05\x07\x1a\x0a" \
+ "\x07\x1a\x09\x0b\x4f\x09\x0c\xdb\x06\x05\xea\x06\x05\xde\x0a\x04\x0e\x0a\x0b\x0e\x09\x06" \
+ "\x86\x08\x05\x60\x0b\x07\x74\x09\x05\x4f\x08\x04\xf0\x07\x09\x90\x06\x08\x70\x0a\x0c\x21" \
+ "\x07\x05\x6f\x0b\x0c\xcc\x04\x07\x90\x07\x04\xea\x0a\x08\x33\x04\x06\x34\x09\x06\xdc\x04" \
+ "\x06\x40\x07\x05\x2e\x04\x06\x48\x06\x07\x87\x07\x05\x68\x0a\x0d\x1a\x07\x04\x45\x07\x05" \
+ "\x05\x08\x05\x0e\x08\x05\x58\x08\x04\xb6\x10\x09\xf8\x04\x06\x3c\x07\x09\xbc\x0c\x06\xd0" \
+ "\x0c\x0b\xe7\x04\x06\x44\x04\x0a\x31\x0b\x0c\x05\x04\x06\x28\x11\x07\x5a\x07\x0c\xc5\x07" \
+ "\x05\xa0\x0c\x09\x6f\x08\x0c\xbb\x08\x0a\x76\x09\x08\x16\x08\x08\x69\x06\x05\xe4\x09\x04" \
+ "\x86\x07\x05\x38\x06\x0a\x4f\x08\x04\xc6\x0f\x08\xf4\x0b\x04\x31\x07\x0a\x04\x07\x08\xa1" \
+ "\x0d\x0c\x55\x06\x05\xc0\x06\x05\xba\x05\x05\x41\x08\x0b\x87\x08\x04\x89\x04\x05\x35\x0c" \
+ "\x0a\x5a\x09\x04\x68\x09\x04\x9c\x0a\x06\xba\x06\x07\x0d\x05\x07\x25\x09\x0b\x9d\x09\x0a" \
+ "\x69\x06\x0a\x6c\x04\x06\x38\x04\x06\x30\x07\x0d\x13\x08\x08\x4c\x05\x06\x15\x06\x04\x50" \
+ "\x0a\x07\x04\x06\x07\xf7\x04\x08\x49\x0f\x08\x89\x0c\x09\x3f\x05\x06\x81\x11\x08\xdc\x0d" \
+ "\x04\x5c\x11\x06\x5a\x05\x0d\x0e\x06\x05\xd8\x04\x08\xd3\x06\x05\xd2\x07\x05\x7d\x06\x05" \
+ "\xcc\x07\x08\xd6\x05\x06\x0b\x07\x05\xa7\x05\x05\x16\x08\x05\x1a\x09\x05\x46\x06\x05\xc6" \
+ "\x06\x09\x31\x0d\x0b\xcf\x09\x08\x62\x08\x04\xf8\x04\x08\x54\x0a\x06\x7f\x04\x04\x71\x0c" \
+ "\x0c\x16\x04\x05\x2e\x08\x0b\x3f\x11\x0c\x23\x08\x0c\x7b\x09\x0b\xc7\x07\x07\xf6\x05\x0b" \
+ "\x3b\x09\x08\x75\x09\x0c\x81\x09\x06\xe9\x0b\x09\xb0\x07\x05\x22\x07\x04\xa3\x07\x06\xc2" \
+ "\x07\x05\x99\x05\x06\x06\x05\x05\xfc\x04\x09\xc3\x04\x06\x4c\x08\x04\xbe\x09\x0b\x2a"
+
+TCOMP_END_DECLS
+
+#endif /* _TINYSIGCOMPP_RFC5112_H_ */
diff --git a/tinySIGCOMP/src/tcomp_state.c b/tinySIGCOMP/src/tcomp_state.c
new file mode 100644
index 0000000..701086b
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_state.c
@@ -0,0 +1,191 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_state.c
+ * @brief SigComp state.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_state.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_sha1.h"
+
+/** Creates new SigComp state.
+*/
+tcomp_state_t* tcomp_state_create(uint16_t length, uint16_t address, uint16_t instruction, uint16_t minimum_access_length, uint16_t retention_priority)
+{
+ return tsk_object_new(tcomp_state_def_t, length, address, instruction, minimum_access_length, retention_priority);
+}
+
+/** Compares two sigomp states.
+* @param state1 First state to compare.
+* @param state2 Second state to compare.
+* @retval 1 if the two handles are equals and 0 otherwise.
+*/
+int tcomp_state_equals(const tcomp_state_t *state1, const tcomp_state_t *state2)
+{
+ if(state1 && state2)
+ {
+ return tcomp_buffer_equals(state1->identifier, state2->identifier);
+ }
+ else if(!state1 && !state2) return 1;
+ else return 0;
+}
+
+/**Computes the state identifier by calculating a 20-byte SHA-1 hash [RFC-3174] over the
+* byte string formed by concatenating the state_length, state_address,
+* state_instruction, minimum_access_length and state_value (in the order given).
+* @param state The state to make valid.
+*/
+void tcomp_state_makeValid(tcomp_state_t* state)
+{
+ tsk_sha1context_t sha;
+
+ if(!state){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ /* Lock */
+ tsk_safeobj_lock(state);
+
+ tcomp_buffer_allocBuff(state->identifier, TSK_SHA1_DIGEST_SIZE);
+
+ /*=============
+ * Calculates a 20-byte SHA-1 hash [RFC-3174] over the byte string formed by concatenating the state_length, state_address,
+ * state_instruction, minimum_access_length and state_value (in the order given). This is the state_identifier.
+ */
+ {
+ uint8_t i;
+ int32_t err = tsk_sha1reset(&sha);
+ uint8_t firstPart[8];
+
+#ifdef __SYMBIAN32__
+ uint16_t values[4];
+ values[0] = state->length,
+ values[1] = state->address,
+ values[2] = state->instruction,
+ values[3] = state->minimum_access_length;
+
+#else
+ uint16_t values[4] = { state->length, state->address, state->instruction, state->minimum_access_length };
+#endif
+
+ for(i=0; i<4; i++)
+ {
+ #if 0 /*BIG_ENDIAN*/// Do not change this (it's for my own tests)
+ firstPart[i] = (values[i] & 0xff);
+ firstPart[i+1] = (values[i] >> 8);
+ #else
+ firstPart[2*i] = (values[i] >> 8);
+ firstPart[2*i+1] = (values[i]& 0xff);
+ #endif
+ }
+
+ tsk_sha1input(&sha, firstPart, 8);
+ tsk_sha1input(&sha, tcomp_buffer_getBuffer(state->value), tcomp_buffer_getSize(state->value));
+ err = tsk_sha1result(&sha, (char*)tcomp_buffer_getBuffer(state->identifier));
+ }
+
+ /* unlock */
+ tsk_safeobj_unlock(state);
+}
+
+
+
+
+
+//========================================================
+// State object definition
+//
+static tsk_object_t* tcomp_state_ctor(tsk_object_t * self, va_list * app)
+{
+ tcomp_state_t *state = self;
+ if(state){
+#if defined(__GNUC__)
+ state->length = (uint16_t)va_arg(*app, unsigned);
+ state->address = (uint16_t)va_arg(*app, unsigned);
+ state->instruction = (uint16_t)va_arg(*app, unsigned);
+ state->minimum_access_length = (uint16_t)va_arg(*app, unsigned);
+ state->retention_priority = (uint16_t)va_arg(*app, unsigned);
+#else
+ state->length = va_arg(*app, uint16_t);
+ state->address = va_arg(*app, uint16_t);
+ state->instruction = va_arg(*app, uint16_t);
+ state->minimum_access_length = va_arg(*app, uint16_t);
+ state->retention_priority = va_arg(*app, uint16_t);
+#endif
+
+ state->value = tcomp_buffer_create_null();
+ state->identifier = tcomp_buffer_create_null();
+
+ /* Initialize safeobject */
+ tsk_safeobj_init(state);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new state.");
+ }
+ return state;
+}
+
+static tsk_object_t* tcomp_state_dtor(tsk_object_t *self)
+{
+ tcomp_state_t *state = self;
+ if(state){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(state);
+
+ TSK_OBJECT_SAFE_FREE(state->identifier);
+ TSK_OBJECT_SAFE_FREE(state->value);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp state.");
+ }
+
+ return self;
+}
+
+
+static int tcomp_state_cmp(const void *obj1, const void *obj2)
+{
+ const tcomp_state_t *state1 = obj1;
+ const tcomp_state_t *state2 = obj2;
+
+ if(state1 && state2){
+ return tcomp_buffer_equals(state1->identifier, state2->identifier) ? 0 : -1;
+ }
+ else if(!state1 && !state2) return 0;
+ else return -1;
+}
+
+static const tsk_object_def_t tcomp_state_def_s =
+{
+ sizeof(tcomp_state_t),
+ tcomp_state_ctor,
+ tcomp_state_dtor,
+ tcomp_state_cmp
+};
+const tsk_object_def_t *tcomp_state_def_t = &tcomp_state_def_s;
+
diff --git a/tinySIGCOMP/src/tcomp_state.h b/tinySIGCOMP/src/tcomp_state.h
new file mode 100644
index 0000000..c9b3316
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_state.h
@@ -0,0 +1,78 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_state.h
+ * @brief SIGCOMP state.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_STATE_H
+#define TCOMP_STATE_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_buffer.h"
+#include "tsk_safeobj.h"
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+#define TCOMP_PARTIAL_ID_LEN_CODE 0x01
+#define TCOMP_PARTIAL_ID_LEN_VALUE 0x06
+
+/**For the purpose of calculation, each state item is considered to cost (state_length + 64) bytes.
+*/
+#define TCOMP_GET_STATE_SIZE(state) ( (state) ? ((state)->length + 64) : 0 )
+
+/**SigComp state.
+*/
+typedef struct tcomp_state_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tcomp_buffer_handle_t *value; /**< State's value. */
+ tcomp_buffer_handle_t *identifier; /**< State's identifier. */
+
+ uint16_t length; /**< State's length. */
+ uint16_t address; /**< State's address. */
+ uint16_t instruction; /**< State's instruction. */
+ uint16_t minimum_access_length; /**< State's minimum access length. */
+ uint16_t retention_priority; /**< State's retention priority. */
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_state_t;
+
+typedef tcomp_state_t tcomp_dictionary_t; /**< Ad dictionary is a @ref tcomp_state_t. */
+
+tcomp_state_t* tcomp_state_create(uint16_t length, uint16_t address, uint16_t instruction, uint16_t minimum_access_length, uint16_t retention_priority);
+
+int tcomp_state_equals(const tcomp_state_t *state1, const tcomp_state_t *state2);
+void tcomp_state_makeValid(tcomp_state_t*);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_state_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_STATE_H */
diff --git a/tinySIGCOMP/src/tcomp_statehandler.c b/tinySIGCOMP/src/tcomp_statehandler.c
new file mode 100644
index 0000000..0cc6373
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_statehandler.c
@@ -0,0 +1,415 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_statehandler.c
+ * @brief SigComp state handler.
+ * Entity responsible for accessing and storing state information once permission is granted by the application.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_statehandler.h"
+#include "tcomp_rfc5049_sip.h"
+#include "tcomp_nack_codes.h"
+#include "tcomp_dicts.h"
+#include "tcomp_udvm.h"
+
+#include "tsk_debug.h"
+
+static int pred_find_compartment_by_id(const tsk_list_item_t *item, const void *id)
+{
+ if(item && item->data){
+ tcomp_compartment_t *compartment = item->data;
+ uint64_t res = (compartment->identifier - *((uint64_t*)id));
+ return res > 0 ? (int)1 : (res < 0 ? (int)-1 : (int)0);
+ }
+ return -1;
+}
+
+/**Creates new SigComp state handler.
+*/
+tcomp_statehandler_t* tcomp_statehandler_create()
+{
+ return tsk_object_new(tcomp_statehandler_def_t);
+}
+
+tcomp_compartment_t *tcomp_statehandler_getCompartment(const tcomp_statehandler_t *statehandler, uint64_t id)
+{
+ tcomp_compartment_t *result = tsk_null;
+ tcomp_compartment_t* newcomp = tsk_null;
+ const tsk_list_item_t *item_const;
+
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ tsk_safeobj_lock(statehandler);
+
+ item_const = tsk_list_find_item_by_pred(statehandler->compartments, pred_find_compartment_by_id, &id);
+ if(!item_const || !(result = item_const->data)){
+ newcomp = tcomp_compartment_create(id, tcomp_params_getParameters(statehandler->sigcomp_parameters));
+ result = newcomp;
+ tsk_list_push_back_data(statehandler->compartments, ((void**) &newcomp));
+ }
+
+ tsk_safeobj_unlock(statehandler);
+
+ return result;
+}
+
+void tcomp_statehandler_deleteCompartment(tcomp_statehandler_t *statehandler, uint64_t id)
+{
+ tcomp_compartment_t *compartment;
+ const tsk_list_item_t *item_const;
+
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ tsk_safeobj_lock(statehandler);
+
+ item_const = tsk_list_find_item_by_pred(statehandler->compartments, pred_find_compartment_by_id, &id);
+ if(item_const && (compartment = item_const->data)){
+ TSK_DEBUG_INFO("SigComp - Delete compartment %lld", id);
+ tsk_list_remove_item_by_data(statehandler->compartments, compartment);
+ }
+
+ tsk_safeobj_unlock(statehandler);
+}
+
+
+tsk_bool_t tcomp_statehandler_compartmentExist(tcomp_statehandler_t *statehandler, uint64_t id)
+{
+ tsk_bool_t exist;
+
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return tsk_false;
+ }
+
+ tsk_safeobj_lock(statehandler);
+ exist = (tsk_list_find_item_by_pred(statehandler->compartments, pred_find_compartment_by_id, &id) ? 1 : 0);
+ tsk_safeobj_unlock(statehandler);
+
+ return exist;
+}
+
+
+uint16_t tcomp_statehandler_findState(tcomp_statehandler_t *statehandler, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t** lpState)
+{
+ uint16_t count = 0;
+ tsk_list_item_t *item;
+
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+
+ tsk_safeobj_lock(statehandler);
+
+ //
+ // Compartments
+ //
+ tsk_list_foreach(item, statehandler->compartments){
+ tcomp_compartment_t *compartment = item->data;
+ count = tcomp_compartment_findState(compartment, partial_identifier, lpState);
+ }
+
+ if(count){
+ goto bail;
+ }
+
+ //
+ // Dictionaries
+ //
+ tsk_list_foreach(item, statehandler->dictionaries){
+ tcomp_dictionary_t *dictionary = item->data;
+ if(tcomp_buffer_startsWith(dictionary->identifier, partial_identifier)){
+ *lpState = dictionary;
+ count++;
+ }
+ }
+bail:
+ tsk_safeobj_unlock(statehandler);
+
+ return count;
+}
+
+void tcomp_statehandler_handleResult(tcomp_statehandler_t *statehandler, tcomp_result_t **lpResult)
+{
+ tcomp_compartment_t *lpCompartment;
+ uint16_t compartment_total_size;
+ uint8_t i;
+
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return;
+ }
+
+ /*== Do not lock --> all functions are thread-safe. */
+ //tsk_safeobj_lock(statehandler);
+
+ /*
+ * The compressor does not wish (or no longer wishes) to save state information?
+ */
+ if((*lpResult)->ret_feedback && (*lpResult)->req_feedback->S){
+ if(tcomp_statehandler_compartmentExist(statehandler, (*lpResult)->compartmentId)){
+ tcomp_statehandler_deleteCompartment(statehandler, (*lpResult)->compartmentId);
+ }
+ return;
+ }
+
+ /*
+ * Find corresponding compartment (only if !S)
+ */
+ if(lpCompartment = tcomp_statehandler_getCompartment(statehandler, (*lpResult)->compartmentId)){
+ compartment_total_size = lpCompartment->total_memory_size;
+ }
+ else{
+ goto bail;
+ }
+
+//compartment_create_states:
+ /*
+ * Request state creation now we have the corresponding compartement.
+ */
+ if(tcomp_result_getTempStatesToCreateSize(*lpResult)){
+ /* Check compartment allocated size*/
+ if(!compartment_total_size){
+ goto compartment_free_states;
+ }
+
+ // FIXME: lock
+ for (i = 0; i < tcomp_result_getTempStatesToCreateSize(*lpResult); i++)
+ {
+ tcomp_state_t **lpState = ((*lpResult)->statesToCreate + i);
+ if(!lpState || !*lpState) continue;
+
+ /*
+ * If the state creation request needs more state memory than the
+ * total state_memory_size for the compartment, the state handler
+ * deletes all but the first (state_memory_size - 64) bytes from the state_value.
+ */
+ if(TCOMP_GET_STATE_SIZE(*lpState) > compartment_total_size){
+ tsk_size_t oldSize, newSize;
+ tcomp_compartment_clearStates(lpCompartment);
+ oldSize = tcomp_buffer_getSize((*lpState)->value);
+ newSize = (compartment_total_size - 64);
+ tcomp_buffer_removeBuff((*lpState)->value, newSize, (oldSize-newSize));
+ (*lpState)->length = newSize;
+
+ tcomp_compartment_addState(lpCompartment, lpState);
+ }
+
+ /*
+ * If the state creation request exceeds the state memory allocated
+ * to the compartment, sufficient items of state created by the same
+ * compartment are freed until enough memory is available to
+ * accommodate the new state.
+ */
+ else{
+ while(lpCompartment->total_memory_left < TCOMP_GET_STATE_SIZE(*lpState)){
+ tcomp_compartment_freeStateByPriority(lpCompartment);
+ }
+ tcomp_compartment_addState(lpCompartment, lpState);
+ }
+ }
+ }
+
+compartment_free_states:
+ /*
+ * Request state free now we have the correponding comprtement
+ */
+ if(tcomp_result_getTempStatesToFreeSize((const tcomp_result_t*)*lpResult)){
+ tcomp_compartment_freeStates(lpCompartment, (*lpResult)->statesToFree, tcomp_result_getTempStatesToFreeSize((const tcomp_result_t*)*lpResult));
+ }
+
+//compartment_remote_params:
+ /*
+ * Set remote -compressor- parameters.
+ */
+ tcomp_compartment_setRemoteParams(lpCompartment, (*lpResult)->remote_parameters);
+
+//feedbacks:
+ /*
+ * Set both Returned and Requested feedbacks.
+ */
+
+ if(tcomp_buffer_getSize((*lpResult)->req_feedback->item)){
+ tcomp_compartment_setReqFeedback(lpCompartment, (*lpResult)->req_feedback->item);
+ }
+ if(tcomp_buffer_getSize((*lpResult)->ret_feedback)){
+ tcomp_compartment_setRetFeedback(lpCompartment, (*lpResult)->ret_feedback);
+ }
+
+bail: ;
+ //--tsk_safeobj_unlock(lpCompartment);
+ //--tsk_safeobj_unlock(statehandler);
+}
+
+tsk_bool_t tcomp_statehandler_handleNack(tcomp_statehandler_t *statehandler, const tcomp_nackinfo_t * nackinfo)
+{
+ tcomp_buffer_handle_t *sha_id;
+ tsk_list_item_t *item;
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return tsk_false;
+ }
+
+ tcomp_buffer_referenceBuff(&sha_id, ((tcomp_nackinfo_t*)nackinfo)->sha1, TSK_SHA1_DIGEST_SIZE);
+
+ tsk_list_foreach(item, statehandler->compartments)
+ {
+ tcomp_compartment_t* lpCompartement = item->data;
+ if(tcomp_compartment_hasNack(lpCompartement, &sha_id))
+ {
+ // this compartment is responsible for this nack
+ switch(nackinfo->reasonCode)
+ {
+ case NACK_STATE_NOT_FOUND:
+ {
+ // Next commented because in this version remote state ids are never saved.
+ // Only the ghost has information on last partial state id to use --> reset the ghost
+ /*SigCompState* lpState = NULL;
+ lpCompartement->findState(&nack_info->details, &lpState);
+ if(lpState)
+ {
+ lpCompartement->freeState(lpState);
+ }*/
+ tcomp_compartment_freeGhostState(lpCompartement);
+ }
+ break;
+
+ default:
+ {
+ tcomp_compartment_clearStates(lpCompartement);
+ }
+ break;
+ }
+ }
+ }
+ return tsk_true;
+}
+
+int tcomp_statehandler_addSipSdpDictionary(tcomp_statehandler_t *statehandler)
+{
+ if(!statehandler){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ tsk_safeobj_lock(statehandler);
+
+ if(!statehandler->hasSipSdpDictionary){
+ tcomp_dictionary_t* sip_dict = tcomp_dicts_create_sip_dict();
+ tsk_list_push_back_data(statehandler->dictionaries, ((void**) &sip_dict));
+ statehandler->hasSipSdpDictionary = 1;
+ }
+
+ tsk_safeobj_unlock(statehandler);
+ return 0;
+}
+
+int tcomp_statehandler_addPresenceDictionary(tcomp_statehandler_t *statehandler)
+{
+ if(!statehandler){
+ TSK_DEBUG_ERROR("NULL SigComp state handler.");
+ return -1;
+ }
+
+ tsk_safeobj_lock(statehandler);
+
+ if(!statehandler->hasPresenceDictionary){
+ tcomp_dictionary_t* pres_dict = tcomp_dicts_create_presence_dict();
+ tsk_list_push_back_data(statehandler->dictionaries, ((void**) &pres_dict));
+ statehandler->hasPresenceDictionary = 1;
+ }
+
+ tsk_safeobj_unlock(statehandler);
+ return 0;
+}
+
+
+
+
+
+
+
+//========================================================
+// State hanlder object definition
+//
+
+static tsk_object_t* tcomp_statehandler_ctor(tsk_object_t * self, va_list * app)
+{
+ tcomp_statehandler_t *statehandler = self;
+ if(statehandler){
+ /* Initialize safeobject */
+ tsk_safeobj_init(statehandler);
+
+ /* RFC 3320 - 3.3. SigComp Parameters */
+ statehandler->sigcomp_parameters = tcomp_params_create();
+ tcomp_params_setDmsValue(statehandler->sigcomp_parameters, SIP_RFC5049_DECOMPRESSION_MEMORY_SIZE);
+ tcomp_params_setSmsValue(statehandler->sigcomp_parameters, SIP_RFC5049_STATE_MEMORY_SIZE);
+ tcomp_params_setCpbValue(statehandler->sigcomp_parameters, SIP_RFC5049_CYCLES_PER_BIT);
+
+ statehandler->dictionaries = tsk_list_create();
+ statehandler->compartments = tsk_list_create();
+
+ statehandler->sigcomp_parameters->SigComp_version = SIP_RFC5049_SIGCOMP_VERSION;
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp state handler.");
+ }
+
+ return self;
+}
+
+static void* tcomp_statehandler_dtor(tsk_object_t *self)
+{
+ tcomp_statehandler_t *statehandler = self;
+ if(statehandler){
+ /* Deinitialize safeobject */
+ tsk_safeobj_deinit(statehandler);
+
+ TSK_OBJECT_SAFE_FREE(statehandler->sigcomp_parameters);
+
+ TSK_OBJECT_SAFE_FREE(statehandler->dictionaries);
+ TSK_OBJECT_SAFE_FREE(statehandler->compartments);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null SigComp state handler.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_statehandler_def_s =
+{
+ sizeof(tcomp_statehandler_t),
+ tcomp_statehandler_ctor,
+ tcomp_statehandler_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_statehandler_def_t = &tsk_statehandler_def_s;
diff --git a/tinySIGCOMP/src/tcomp_statehandler.h b/tinySIGCOMP/src/tcomp_statehandler.h
new file mode 100644
index 0000000..5b33f87
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_statehandler.h
@@ -0,0 +1,82 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_statehandler.h
+ * @brief SigComp state handler.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_STATE_HANDLER_H
+#define TCOMP_STATE_HANDLER_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_types.h"
+#include "tcomp_params.h"
+#include "tcomp_nackinfo.h"
+#include "tcomp_result.h"
+#include "tcomp_buffer.h"
+#include "tcomp_compartment.h"
+#include "tcomp_state.h"
+
+#include "tsk_safeobj.h"
+#include "tsk_object.h"
+
+TCOMP_BEGIN_DECLS
+
+/**State handler.
+*/
+typedef struct tcomp_statehandler_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tcomp_compartments_L_t *compartments;
+ tcomp_params_t *sigcomp_parameters;
+
+ tcomp_dictionaries_L_t *dictionaries;
+ int hasSipSdpDictionary;
+ int hasPresenceDictionary;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tcomp_statehandler_t;
+
+tcomp_statehandler_t* tcomp_statehandler_create();
+
+tcomp_compartment_t *tcomp_statehandler_getCompartment(const tcomp_statehandler_t *statehandler, uint64_t id);
+void tcomp_statehandler_deleteCompartment(tcomp_statehandler_t *statehandler, uint64_t id);
+tsk_bool_t tcomp_statehandler_compartmentExist(tcomp_statehandler_t *statehandler, uint64_t id);
+uint16_t tcomp_statehandler_findState(tcomp_statehandler_t *statehandler, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t** lpState);
+
+void tcomp_statehandler_handleResult(tcomp_statehandler_t *statehandler, tcomp_result_t **lpResult);
+tsk_bool_t tcomp_statehandler_handleNack(tcomp_statehandler_t *statehandler, const tcomp_nackinfo_t *);
+
+int tcomp_statehandler_addSipSdpDictionary(tcomp_statehandler_t *statehandler);
+int tcomp_statehandler_addPresenceDictionary(tcomp_statehandler_t *statehandler);
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_statehandler_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_STATE_HANDLER_H */
diff --git a/tinySIGCOMP/src/tcomp_types.h b/tinySIGCOMP/src/tcomp_types.h
new file mode 100644
index 0000000..ccac9cf
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_types.h
@@ -0,0 +1,38 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+#ifndef TCOMP_TYPES_H
+#define TCOMP_TYPES_H
+
+#include "tsk_list.h"
+
+TCOMP_BEGIN_DECLS
+
+typedef tsk_list_t tcomp_buffers_L_t; /**< List containing @ref tcomp_buffer_handle_t elements. */
+typedef tsk_list_t tcomp_states_L_t; /**< List containing @ref tcomp_state_t elements. */
+typedef tsk_list_t tcomp_dictionaries_L_t; /**< List containing @ref tcomp_dictionary_t elements. */
+typedef tsk_list_t tcomp_compartments_L_t; /** List containing @ref tcomp_compartment_t elements. */
+typedef tsk_list_t tcomp_stream_buffer_L_t; /** List containing @ref tcomp_stream_buffer_t elements. */
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_TYPES_H */
diff --git a/tinySIGCOMP/src/tcomp_udvm.bytecopy.c b/tinySIGCOMP/src/tcomp_udvm.bytecopy.c
new file mode 100644
index 0000000..07bd983
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.bytecopy.c
@@ -0,0 +1,132 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.nack.c
+ * @brief SigComp UDVM machine (byte copying).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+
+
+#define TCOMP_UDVM_MEMORY_REGISTERS_PTR TCOMP_UDVM_GET_BUFFER_AT(UDVM_REGISTERS_START)
+
+
+/**RFC3320-Setction_8.4. Byte copying
+From UDVM to UDVM
+*/
+int tcomp_udvm_bytecopy_self(tcomp_udvm_t *udvm, uint16_t *destination, uint16_t source, uint16_t tsk_size_tocopy)
+{
+ uint16_t byte_copy_left, byte_copy_right;
+ //if (*destination == TCOMP_UDVM_GET_SIZE() || source == TCOMP_UDVM_GET_SIZE())
+ if (*destination >= TCOMP_UDVM_GET_SIZE() || source >= TCOMP_UDVM_GET_SIZE())
+ {
+ /* SEGFAULT */
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return 0;
+ }
+
+ /*
+ * The string of bytes is copied in ascending order of memory address,
+ * respecting the bounds set by byte_copy_left and byte_copy_right.
+ */
+ byte_copy_left = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX);
+ byte_copy_right = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX);
+
+ // string of bytes is copied one byte at a time
+ while((tsk_size_tocopy--))
+ {
+ *TCOMP_UDVM_GET_BUFFER_AT((*destination)++) = *TCOMP_UDVM_GET_BUFFER_AT(source++);
+
+ *destination = (*destination == byte_copy_right)? byte_copy_left : *destination;
+ source = (source == byte_copy_right)? byte_copy_left : source;
+ }
+
+ return 1;
+}
+
+/**RFC3320-Setction_8.4. Byte copying
+From EXTERNAL to UDVM
+*/
+int tcomp_udvm_bytecopy_to(tcomp_udvm_t *udvm, uint16_t destination, const uint8_t* source, uint16_t tsk_size_tocopy)
+{
+ uint16_t byte_copy_left, byte_copy_right;
+
+ if(destination == TCOMP_UDVM_GET_SIZE())
+ {
+ /* SEGFAULT */
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return 0;
+ }
+
+ /*
+ * The string of bytes is copied in ascending order of memory address,
+ * respecting the bounds set by byte_copy_left and byte_copy_right.
+ */
+ byte_copy_left = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX);
+ byte_copy_right = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX);
+
+ // string of bytes is copied one byte at a time
+ while((tsk_size_tocopy--))
+ {
+ *TCOMP_UDVM_GET_BUFFER_AT(destination++) = *(source++);
+
+ destination = (destination == byte_copy_right)? byte_copy_left : destination;
+ }
+
+ return 1;
+}
+
+/**RFC3320-Setction_8.4. Byte copying
+From UDVM to EXTERNAL
+*/
+int tcomp_udvm_bytecopy_from(tcomp_udvm_t *udvm, uint8_t* destination, uint16_t source, uint16_t tsk_size_tocopy)
+{
+ uint16_t byte_copy_left, byte_copy_right;
+
+ if(source == TCOMP_UDVM_GET_SIZE())
+ {
+ /* SEGFAULT */
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return 0;
+ }
+
+ /*
+ * The string of bytes is copied in ascending order of memory address,
+ * respecting the bounds set by byte_copy_left and byte_copy_right.
+ */
+ byte_copy_left = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX);
+ byte_copy_right = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX);
+
+
+ // string of bytes is copied one byte at a time
+ while((tsk_size_tocopy--))
+ {
+ *(destination++) = *TCOMP_UDVM_GET_BUFFER_AT(source++);
+
+ source = (source == byte_copy_right)? byte_copy_left : source;
+ }
+
+ return 1;
+}
diff --git a/tinySIGCOMP/src/tcomp_udvm.c b/tinySIGCOMP/src/tcomp_udvm.c
new file mode 100644
index 0000000..4afe5ee
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.c
@@ -0,0 +1,550 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.c
+ * @brief SigComp UDVM machine.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+#include "tsk_debug.h"
+
+#include <string.h>
+
+#define TCOMP_UDVM_HEADER_RESERVED_SIZE 22
+
+tcomp_udvm_t* tcomp_udvm_create(tcomp_message_t* _sigCompMessage, tcomp_statehandler_t* stateHandler, tcomp_result_t* lpResult)
+{
+ return tsk_object_new(tcomp_udvm_def_t, _sigCompMessage, stateHandler, lpResult);
+}
+
+/**Executes the bytecode.
+*/
+static tsk_bool_t tcomp_udvm_runByteCode(tcomp_udvm_t *udvm)
+{
+ uint16_t operand_1, operand_2, operand_3, operand_4, operand_5, operand_6, operand_7;
+ tsk_bool_t excution_failed = tsk_false, end_message = tsk_false;
+ if(!udvm->isOK) {
+ TSK_DEBUG_ERROR("Cannot run()/execute() invalid bytecode");
+ return tsk_false;
+ }
+
+ // LOOP - EXCUTE all bytecode
+ while( !excution_failed && !end_message )
+ {
+ uint8_t udvm_instruction = * (TCOMP_UDVM_GET_BUFFER_AT(udvm->executionPointer));
+ udvm->last_memory_address_of_instruction = udvm->executionPointer;
+ udvm->executionPointer++; /* Skip the 1-byte [INSTRUCTION]. */
+
+ switch(udvm_instruction)
+ {
+ case TCOMP_UDVM_INST__DECOMPRESSION_FAILURE:
+ {
+ TCOMP_UDVM_EXEC_INST__DECOMPRESSION_FAILURE(udvm);
+ excution_failed = tsk_true;
+ break;
+ }
+
+ case TCOMP_UDVM_INST__AND:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__AND(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__OR:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__OR(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__NOT:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__NOT(udvm, operand_1);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__LSHIFT:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__LSHIFT(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__RSHIFT:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__RSHIFT(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__ADD:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__ADD(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__SUBTRACT:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__SUBTRACT(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__MULTIPLY:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__MULTIPLY(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__DIVIDE:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__DIVIDE(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__REMAINDER:
+ {
+ operand_1 = tcomp_udvm_opget_reference_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__REMAINDER(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__SORT_ASCENDING:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__SORT_ASCENDING(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__SORT_DESCENDING:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__SORT_DESCENDING(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__SHA_1:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__SHA_1(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__LOAD:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__LOAD(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__MULTILOAD:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_literal_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__MULTILOAD(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__PUSH:
+ {
+ excution_failed = !TCOMP_UDVM_EXEC_INST__PUSH2(udvm);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__POP:
+ {
+ excution_failed = !TCOMP_UDVM_EXEC_INST__POP2(udvm);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__COPY:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__COPY(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__COPY_LITERAL:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_reference_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__COPY_LITERAL(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__COPY_OFFSET:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_reference_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__COPY_OFFSET(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__MEMSET:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_4 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__MEMSET(udvm, operand_1, operand_2, operand_3, operand_4);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__JUMP:
+ {
+ excution_failed = !TCOMP_UDVM_EXEC_INST__JUMP2(udvm);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__COMPARE:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ operand_4 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ operand_5 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__COMPARE(udvm, operand_1, operand_2, operand_3, operand_4, operand_5);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__CALL:
+ {
+ operand_1 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__CALL(udvm, operand_1);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__RETURN:
+ {
+ excution_failed = !TCOMP_UDVM_EXEC_INST__RETURN(udvm);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__SWITCH:
+ {
+ operand_1 = tcomp_udvm_opget_literal_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__SWITCH(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__CRC:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_4 = tcomp_udvm_opget_reference_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__CRC(udvm, operand_1, operand_2, operand_3, operand_4);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__INPUT_BYTES:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__INPUT_BYTES(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__INPUT_BITS:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__INPUT_BITS(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__INPUT_HUFFMAN:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ operand_3 = tcomp_udvm_opget_literal_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__INPUT_HUFFMAN(udvm, operand_1, operand_2, operand_3);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__STATE_ACCESS:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_4 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_5 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_6 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__STATE_ACCESS(udvm, operand_1, operand_2, operand_3, operand_4, operand_5, operand_6);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__STATE_CREATE:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_4 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_5 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__STATE_CREATE(udvm, operand_1, operand_2, operand_3, operand_4, operand_5);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__STATE_FREE:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__STATE_FREE(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__OUTPUT:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__OUTPUT(udvm, operand_1, operand_2);
+ break;
+ }
+
+ case TCOMP_UDVM_INST__END_MESSAGE:
+ {
+ operand_1 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_2 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_3 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_4 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_5 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_6 = tcomp_udvm_opget_multitype_param(udvm);
+ operand_7 = tcomp_udvm_opget_multitype_param(udvm);
+ excution_failed = !TCOMP_UDVM_EXEC_INST__END_MESSAGE(udvm, operand_1, operand_2, operand_3, operand_4, operand_5, operand_6, operand_7);
+ end_message = 1;
+ break;
+ }
+
+ default:
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_OPCODE);
+ goto bail;
+ }
+
+ //TCOMP_UDVM_DEBUG_PRINT(200);
+ }
+
+bail:
+ udvm->lpResult->consumed_cycles = udvm->consumed_cycles;
+ return (!excution_failed);
+}
+
+/**Decompress the bytecode.
+*/
+tsk_bool_t tcomp_udvm_decompress(tcomp_udvm_t *udvm)
+{
+ return tcomp_udvm_runByteCode(udvm);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//========================================================
+// UDVM machine definition
+//
+static tsk_object_t* tcomp_udvm_ctor(tsk_object_t * self, va_list * app)
+{
+ tcomp_udvm_t *udvm = self;
+ if(udvm){
+ /* RFC 3320 - 7. SigComp Message Format */
+ udvm->sigCompMessage = va_arg(*app, tcomp_message_t *);
+ udvm->stateHandler = va_arg(*app, tcomp_statehandler_t *);
+ udvm->lpResult = va_arg(*app, tcomp_result_t *);
+
+ udvm->isOK = tsk_true;
+ udvm->maximum_UDVM_cycles = 0; /* RFC 3320 subclause 8.6 */
+ udvm->consumed_cycles = 0;
+ udvm->memory = tcomp_buffer_create_null();
+
+ /* Alloc UDVM memory */
+ if(udvm->sigCompMessage->stream_based){
+ /*
+ * If the transport is stream-based however, then a fixed-size input buffer is required to accommodate the stream, independently of the
+ * size of each SigComp message. So, for simplicity, the UDVM memory size is set to (decompression_memory_size / 2).
+ */
+
+ tcomp_buffer_allocBuff(udvm->memory, udvm->stateHandler->sigcomp_parameters->dmsValue/2);
+ }
+ else{
+ /*
+ * If the transport is message-based then sufficient memory must be available
+ * to buffer the entire SigComp message before it is passed to the UDVM. So if the message is n bytes long, then the UDVM memory size is set
+ * to (decompression_memory_size - n), up to a maximum of 65536 bytes.
+ */
+ tcomp_buffer_allocBuff(udvm->memory, (udvm->stateHandler->sigcomp_parameters->dmsValue-udvm->sigCompMessage->totalSize));
+ }
+
+ /*
+ * Has feedback with my state id?
+ */
+ if(tcomp_buffer_getSize(udvm->sigCompMessage->ret_feedback_buffer)){
+ tsk_size_t size = tcomp_buffer_getSize(udvm->sigCompMessage->ret_feedback_buffer);
+ tcomp_buffer_allocBuff(udvm->lpResult->ret_feedback, size);
+ memcpy(tcomp_buffer_getBuffer(udvm->lpResult->ret_feedback), tcomp_buffer_getBuffer(udvm->sigCompMessage->ret_feedback_buffer), size);
+ }
+
+ /*
+ * Has state?
+ */
+ if(tcomp_buffer_getSize(udvm->sigCompMessage->stateId)){
+ /* Find the provided state */
+ tcomp_state_t* lpState = NULL;
+ uint16_t match_count = tcomp_statehandler_findState(udvm->stateHandler, udvm->sigCompMessage->stateId, &lpState);
+ if( (!match_count || match_count>1 || !lpState)
+ || (lpState->minimum_access_length > tcomp_buffer_getSize(udvm->sigCompMessage->stateId))
+ || ((tsk_size_t)(lpState->address + lpState->length) > TCOMP_UDVM_GET_SIZE()) )
+ {
+ tcomp_udvm_createNackInfo(udvm, NACK_STATE_NOT_FOUND, udvm->sigCompMessage->stateId, 0);
+ udvm->isOK = tsk_false;
+ return self;
+ }
+ //this->sigCompMessage->stateId.print();//FIXME
+ /*
+ * Copy bytecodes to UDVM memory
+ */
+ if( (tsk_size_t)(lpState->address + lpState->length) >= TCOMP_UDVM_GET_SIZE() ){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ udvm->isOK = tsk_false;
+ return self;
+ }
+ memcpy( TCOMP_UDVM_GET_BUFFER_AT(lpState->address),
+ tcomp_buffer_getBuffer(lpState->value),
+ tcomp_buffer_getSize(lpState->value) );
+
+ //RFC 3320 - 7.2. Accessing Stored State (Useful values)
+ TCOMP_UDVM_SET_2BYTES_VAL(TCOMP_UDVM_HEADER_PARTIAL_STATE_ID_LENGTH_INDEX, tcomp_buffer_getSize(udvm->sigCompMessage->stateId));
+ TCOMP_UDVM_SET_2BYTES_VAL(TCOMP_UDVM_HEADER_STATE_LENGTH_INDEX, tcomp_buffer_getSize(lpState->value));
+
+ udvm->executionPointer = lpState->instruction;
+ }
+ else // DON'T HAVE STATE
+ {
+ /*
+ * Copy bytecodes to UDVM memory
+ */
+ tsk_size_t bytecodes_destination = udvm->sigCompMessage->bytecodes_destination;
+ if( (bytecodes_destination + tcomp_buffer_getSize(udvm->sigCompMessage->uploaded_UDVM_buffer)) >= TCOMP_UDVM_GET_SIZE() ){
+ tcomp_udvm_createNackInfo2(udvm, NACK_BYTECODES_TOO_LARGE);
+ udvm->isOK = tsk_false;
+ return self;
+ }
+ memcpy( TCOMP_UDVM_GET_BUFFER_AT(bytecodes_destination),
+ tcomp_buffer_getBuffer(udvm->sigCompMessage->uploaded_UDVM_buffer),
+ tcomp_buffer_getSize(udvm->sigCompMessage->uploaded_UDVM_buffer));
+
+ // Set pointer indicating execution index
+ udvm->executionPointer = bytecodes_destination;
+ }
+
+ /* RFC 3320-Section_8.6. UDVM Cycles
+ /*
+ * To ensure that a SigComp message cannot consume excessive processing
+ * resources, SigComp limits the number of "UDVM cycles" allocated to
+ * each message. The number of available UDVM cycles is initialized to
+ * 1000 plus the number of bits in the SigComp header (as described in
+ * Section 7); this sum is then multiplied by cycles_per_bit.
+ */
+ /*maximum_UDVM_cycles = (8 * n + 1000) * cycles_per_bit*///FIXME:header_size
+ udvm->maximum_UDVM_cycles = ( (8 * udvm->sigCompMessage->header_size + 1000)* udvm->stateHandler->sigcomp_parameters->cpbValue );
+
+ //
+ // RFC 3320 - 7.2. Useful values
+ //
+ TCOMP_UDVM_SET_2BYTES_VAL(TCOMP_UDVM_HEADER_UDVM_MEMORY_SIZE_INDEX, TCOMP_UDVM_GET_SIZE());
+ TCOMP_UDVM_SET_2BYTES_VAL(TCOMP_UDVM_HEADER_CYCLES_PER_BIT_INDEX, udvm->stateHandler->sigcomp_parameters->cpbValue);
+ TCOMP_UDVM_SET_2BYTES_VAL(TCOMP_UDVM_HEADER_SIGCOMP_VERSION_INDEX, udvm->stateHandler->sigcomp_parameters->SigComp_version);
+ memset(TCOMP_UDVM_GET_BUFFER_AT(TCOMP_UDVM_HEADER_RESERVED_INDEX), 0, TCOMP_UDVM_HEADER_RESERVED_SIZE);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new udvm machine.");
+ }
+
+ return self;
+}
+
+static tsk_object_t* tcomp_udvm_dtor(tsk_object_t *self)
+{
+ tcomp_udvm_t *udvm = self;
+ if(udvm){
+ TSK_OBJECT_SAFE_FREE(udvm->memory);
+ }
+ else{
+ TSK_DEBUG_ERROR("Null udvm machine.");
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tcomp_udvm_def_s =
+{
+ sizeof(tcomp_udvm_t),
+ tcomp_udvm_ctor,
+ tcomp_udvm_dtor,
+ tsk_null
+};
+const tsk_object_def_t *tcomp_udvm_def_t = &tcomp_udvm_def_s;
diff --git a/tinySIGCOMP/src/tcomp_udvm.h b/tinySIGCOMP/src/tcomp_udvm.h
new file mode 100644
index 0000000..cef3acf
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.h
@@ -0,0 +1,163 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.h
+ * @brief The machine architecture described in this document. The UDVM is used to decompress SigComp messages.
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TCOMP_UDVM_H
+#define TCOMP_UDVM_H
+
+#include "tinysigcomp_config.h"
+
+#include "tcomp_message.h"
+#include "tcomp_result.h"
+#include "tcomp_headers_index.h"
+#include "tcomp_nack_codes.h"
+#include "tcomp_statehandler.h"
+#include "tcomp_headers_index.h"
+#include "tcomp_instructions.h"
+
+#include "tsk_object.h"
+
+#include "tsk_binaryutils.h"
+
+TCOMP_BEGIN_DECLS
+
+#define TCOMP_UDVM_SET_2BYTES_VAL(position, value) TSK_BINARY_SET_2BYTES(tcomp_buffer_getBufferAtPos(udvm->memory, position), value)
+#define TCOMP_UDVM_GET_2BYTES_VAL(position) TSK_BINARY_GET_2BYTES(tcomp_buffer_getBufferAtPos(udvm->memory, position))
+
+#if defined(DEBUG) || defined(_DEBUG)
+# define TCOMP_UDVM_DEBUG_PRINT(size) tcomp_buffer_nprint(udvm->memory, size)
+#else
+# define TCOMP_UDVM_DEBUG_PRINT(size) ((void)size)
+#endif
+
+#define TCOMP_UDVM_GET_SIZE() tcomp_buffer_getSize(udvm->memory)
+#define TCOMP_UDVM_GET_BUFFER() tcomp_buffer_getBuffer(udvm->memory)
+#define TCOMP_UDVM_GET_BUFFER_AT(position) tcomp_buffer_getBufferAtPos(udvm->memory, position)
+
+typedef struct tcomp_udvm_s
+{
+ TSK_DECLARE_OBJECT;
+
+ unsigned isOK:1;
+ tcomp_message_t *sigCompMessage;
+ tcomp_statehandler_t *stateHandler;
+ tcomp_result_t *lpResult;
+
+ uint32_t maximum_UDVM_cycles; // RFC3320-Section_8.6
+ uint64_t consumed_cycles;
+
+ tcomp_buffer_handle_t *memory;
+ //header_udvm_memory memoryHeader; // RFC3320-Section_7.2 - // Default constructor will initial values (sip default)
+
+ uint16_t executionPointer;
+ uint16_t last_memory_address_of_instruction;
+}
+tcomp_udvm_t;
+
+tcomp_udvm_t* tcomp_udvm_create(tcomp_message_t* _sigCompMessage,tcomp_statehandler_t* stateHandler, tcomp_result_t* lpResult);
+
+tsk_bool_t tcomp_udvm_decompress(tcomp_udvm_t *udvm);
+
+/*
+* Operands
+*/
+uint16_t tcomp_udvm_opget_literal_param(tcomp_udvm_t *udvm);
+uint16_t tcomp_udvm_opget_reference_param(tcomp_udvm_t *udvm);
+uint16_t tcomp_udvm_opget_multitype_param(tcomp_udvm_t *udvm);
+uint16_t tcomp_udvm_opget_address_param(tcomp_udvm_t *udvm, uint16_t memory_address_of_instruction);
+
+/*
+* ByteCopy
+*/
+int tcomp_udvm_bytecopy_self(tcomp_udvm_t *udvm, uint16_t *destination, uint16_t source, uint16_t tsk_size_tocopy);
+int tcomp_udvm_bytecopy_to(tcomp_udvm_t *udvm, uint16_t destination, const uint8_t* source, uint16_t tsk_size_tocopy);
+int tcomp_udvm_bytecopy_from(tcomp_udvm_t *udvm, uint8_t* destination, uint16_t source, uint16_t tsk_size_tocopy);
+
+/*
+* State Management
+*/
+int tcomp_udvm_byteCopy_TempStates(tcomp_udvm_t *udvm);
+int tcomp_udvm_createTempState(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction,
+ uint16_t minimum_access_length, uint16_t state_retention_priority, int end_msg);
+
+/*
+* Nack creation
+*/
+void tcomp_udvm_createNackInfo(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buffer_handle_t* lpDetails, int16_t memory_address_of_instruction);
+#define tcomp_udvm_createNackInfo2(udvm, reasonCode) tcomp_udvm_createNackInfo(udvm, reasonCode, 0, -1)
+#define tcomp_udvm_createNackInfo3(udvm, reasonCode, lpDetails) tcomp_udvm_createNackInfo(udvm, reasonCode, lpDetails, -1)
+
+/*
+* Instructions
+*/
+tsk_bool_t TCOMP_UDVM_EXEC_INST__DECOMPRESSION_FAILURE(tcomp_udvm_t *udvm);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__AND(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__OR(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__NOT(tcomp_udvm_t *udvm, uint16_t operand_1);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__LSHIFT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__RSHIFT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__ADD(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SUBTRACT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MULTIPLY(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__DIVIDE(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__REMAINDER(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SORT_ASCENDING(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SORT_DESCENDING(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SHA_1(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__LOAD(tcomp_udvm_t *udvm, uint16_t address, uint16_t value);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MULTILOAD(tcomp_udvm_t *udvm, uint16_t address, uint16_t n);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__PUSH(tcomp_udvm_t *udvm, int16_t value);
+#define TCOMP_UDVM_EXEC_INST__PUSH2(udvm) TCOMP_UDVM_EXEC_INST__PUSH(udvm, -1)
+tsk_bool_t TCOMP_UDVM_EXEC_INST__POP(tcomp_udvm_t *udvm, uint16_t* value);
+#define TCOMP_UDVM_EXEC_INST__POP2(udvm) TCOMP_UDVM_EXEC_INST__POP(udvm, 0)
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY_LITERAL(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY_OFFSET(tcomp_udvm_t *udvm, uint16_t offset, uint16_t length, uint16_t destination);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MEMSET(tcomp_udvm_t *udvm, uint16_t address, uint16_t length, uint16_t start_value, uint16_t offset);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__JUMP(tcomp_udvm_t *udvm, int16_t address);
+#define TCOMP_UDVM_EXEC_INST__JUMP2(udvm) TCOMP_UDVM_EXEC_INST__JUMP(udvm, -1)
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COMPARE(tcomp_udvm_t *udvm, uint16_t value_1, uint16_t value_2, uint16_t address_1, uint16_t address_2, uint16_t address_3);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__CALL(tcomp_udvm_t *udvm, uint16_t address);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__RETURN(tcomp_udvm_t *udvm);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SWITCH(tcomp_udvm_t *udvm, uint16_t n, uint16_t j);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__CRC(tcomp_udvm_t *udvm, uint16_t value, uint16_t position, uint16_t length, uint16_t address);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_BYTES(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_BITS(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_HUFFMAN(tcomp_udvm_t *udvm, uint16_t destination, uint16_t address, uint16_t n);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_ACCESS(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length, uint16_t state_begin, uint16_t state_length, uint16_t state_address, uint16_t state_instruction);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_CREATE(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_FREE(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__OUTPUT(tcomp_udvm_t *udvm, uint16_t output_start, uint16_t output_length);
+tsk_bool_t TCOMP_UDVM_EXEC_INST__END_MESSAGE(tcomp_udvm_t *udvm, uint16_t requested_feedback_location, uint16_t returned_parameters_location, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority);
+
+
+TINYSIGCOMP_GEXTERN const tsk_object_def_t *tcomp_udvm_def_t;
+
+TCOMP_END_DECLS
+
+#endif /* TCOMP_UDVM_H */
diff --git a/tinySIGCOMP/src/tcomp_udvm.instructions.c b/tinySIGCOMP/src/tcomp_udvm.instructions.c
new file mode 100644
index 0000000..a653036
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.instructions.c
@@ -0,0 +1,1917 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.instructions.c
+ * @brief SigComp UDVM machine (Instructions).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_ppfcs16.h"
+
+#include <string.h> /* memcpy */
+#include <stdlib.h> /* qsort */
+#include <math.h> /* ceil, log ... */
+
+/*
+* IMPORTANT: MSBs are stored before LSBs in the UDVM memory --> BIG ENDIAN
+*/
+
+#define F_BIT_MSB_TO_LSB 0
+#define F_BIT_LSB_TO_MSB 1
+#define H_BIT_MSB_TO_LSB F_BIT_MSB_TO_LSB
+#define H_BIT_LSB_TO_MSB F_BIT_LSB_TO_MSB
+
+#define CEILLINGLOG2(x) ceil( (log((double)x)/log(2.0)) )
+
+/*
+* Consume cycles
+*/
+#define CONSUME_CYCLES(cycles) \
+ udvm->consumed_cycles += (uint64_t)(cycles); \
+ if( udvm->consumed_cycles > udvm->maximum_UDVM_cycles ) \
+ { \
+ tcomp_udvm_createNackInfo2(udvm, NACK_CYCLES_EXHAUSTED); \
+ return tsk_false; \
+ }
+
+/**
+ This structure is used to keep index-value pairs after sorting.
+*/
+typedef struct IndexValuePair_s
+{
+ uint16_t index;
+ uint16_t value;
+}
+IndexValuePair_t;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @brief Predicate to sort integers in ascending order.
+///
+/// @param [in,out] a First integer.
+/// @param [in,out] b Second integer.
+///
+/// @retval Zero if @a a == @a b; negative if @a a < @a b and positive otherwise..
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static int SortAscendingPredicate(const void *a, const void *b)
+{
+ const IndexValuePair_t *el1 = a;
+ const IndexValuePair_t *el2 = b;
+
+ /* If values are equal the original ordering of the integers must be preserved
+ * ==> We cannot use normal comparaison because the ANSI C implementation of qsort could swap values even if they are equal.
+ */
+ return (el2->value == el1->value) ? (el1->index - el2->index) : (el1->value - el2->value);
+}
+
+/**
+* Sort Descending predicate.
+*/
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+/// @brief Predicate to sort integers in descending order.
+/// @param [in,out] a First integer.
+/// @param [in,out] b Second integer.
+///
+/// @retval Zero if @a a == @a b; negative if @a a > @a b and positive otherwise.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+static int SortDescendingPredicate(const void *a, const void *b)
+{
+ const IndexValuePair_t *el1 = a;
+ const IndexValuePair_t *el2 = b;
+
+ /* If values are equal the original ordering of the integers must be preserved.
+ * ==> We cannot use normal comparaison because the ANSI C implementation of qsort could swap values even if they are equal.
+ */
+ return (el2->value == el1->value) ? (el1->index - el2->index) : (el2->value - el1->value);
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief DECOMPRESSION-FAILURE
+/// Reference: RFC3320 Section 9.4.1
+/// This instruction triggers a manual decompression failure. This is useful if the UDVM bytecode discovers that it
+/// cannot successfully decompress the message (e.g., by using the CRC instruction).
+
+
+/// @param [in,out] udvm The udvm state machine entity.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__DECOMPRESSION_FAILURE(tcomp_udvm_t *udvm)
+{
+ tcomp_udvm_createNackInfo2(udvm, NACK_USER_REQUESTED);
+ return tsk_false;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief AND ($operand_1, %operand_2)
+/// Reference: RFC3320 Section 9.1.1
+/// Formula: [operand_1 := operand_1 & operand_2].
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 The second operand.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__AND(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL( operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) & operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief OR ($operand_1, %operand_2)
+/// Reference: RFC3320 Section 9.1.1
+/// Formula: [operand_1 := operand_1 | operand_2].
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 The second operand.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__OR(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL( operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) | operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>NOT ($operand_1)</i><br><br>
+/// Reference: RFC3320 Section 9.1.1<br>
+/// Formula: [operand_1 := ~operand_1]. <br>
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__NOT(tcomp_udvm_t *udvm, uint16_t operand_1)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL( operand_1,
+ ~( TCOMP_UDVM_GET_2BYTES_VAL(operand_1) ) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>LSHIFT ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.1<br>
+/// Formula: [LSHIFT (m, n) := m * 2^n (modulo 2^16)]. <br>
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__LSHIFT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ // (m * 2^n) == (m<<n)
+ // (2^16) === 65536
+ TCOMP_UDVM_SET_2BYTES_VAL( operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) << operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>RSHIFT ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.1<br>
+/// Formula: [RSHIFT (m, n) := floor(m / 2^n)]. <br>
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__RSHIFT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ // floor(m / 2^n) == (m>>n)
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) >> operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>ADD ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.2<br>
+/// Formula: [ADD (m, n) := m + n (modulo 2^16)]<br>
+///
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand.
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__ADD(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) + operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>SUBTRACT ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.2<br>
+/// Formula: [SUBTRACT (m, n) := m - n (modulo 2^16)]<br>
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand.
+///
+/// @retval 1 if succeed, otherwise returns 0.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SUBTRACT(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) - operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>MULTIPLY ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.2<br>
+/// Formula: [MULTIPLY (m, n) := m * n (modulo 2^16)]<br>
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MULTIPLY(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) * operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>DIVIDE ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.2<br>
+/// Formula: [DIVIDE (m, n) := floor(m / n)]<br>
+///
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand. Decompression failure occurs if this operand is zero.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__DIVIDE(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ if(!operand_2){
+ tcomp_udvm_createNackInfo2(udvm, NACK_DIV_BY_ZERO);
+ return tsk_false;
+ }
+
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) / operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>REMAINDER ($operand_1, %operand_2)</i><br><br>
+/// Reference: RFC3320 Section 9.1.2<br>
+/// Formula: [REMAINDER (m, n) := m - n * floor(m / n)]<br>
+///
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param operand_1 2-byte value encoded by the operand. After the operation is complete, the 2-byte word at the memory address specified by
+/// this operand is overwritten with the result.
+/// @param operand_2 2-byte value encoded by the operand. Decompression failure occurs if this operand is zero.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__REMAINDER(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)
+{
+ CONSUME_CYCLES(1);
+
+ if(!operand_2){
+ tcomp_udvm_createNackInfo2(udvm, NACK_DIV_BY_ZERO);
+ return tsk_false;
+ }
+
+ TCOMP_UDVM_SET_2BYTES_VAL(operand_1,
+ (TCOMP_UDVM_GET_2BYTES_VAL(operand_1) % operand_2) );
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>SORT-ASCENDING (%start, %n, %k)</i><br><br>
+/// Reference: RFC3320 Section 9.1.3<br>
+///
+/// This instruction sort lists of 2-byte words in ascending order.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param start The starting memory address of the block of data to be sorted.
+/// @param n Number of lists.
+/// @param k Lists length (2-byte words).
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SORT_ASCENDING(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)
+{
+ int segfault = 0;
+ uint16_t* list_temp = 0;
+ IndexValuePair_t *list1_values = 0;
+ uint16_t list_index, list_el;
+ int j, pos;
+
+ CONSUME_CYCLES(( 1 + k *(CEILLINGLOG2(k) + n) )); /* 1 + k * (ceiling(log2(k)) + n) */
+
+ if(TCOMP_UDVM_GET_SIZE() <= (tsk_size_t)(start+(n*k*2)) ){
+ segfault = 1;
+ goto __SEGFAULT;
+ };
+
+ //
+ // Create FirstList with key-value pairs
+ //
+ list1_values = (IndexValuePair_t*)tsk_calloc(k, sizeof(IndexValuePair_t));
+ if(!list1_values) { segfault = 1; goto __SEGFAULT; };
+ for(j=0, pos=0; pos<k; j+=2,pos++){
+ list1_values[pos].index = pos;
+ list1_values[pos].value = *((uint16_t*)TCOMP_UDVM_GET_BUFFER_AT(start+j));
+ }
+
+ /*
+ * Sort Fisrt List Values
+ */
+ qsort(list1_values, k, sizeof(IndexValuePair_t), SortAscendingPredicate);
+
+ /* Sort all lists */
+ list_temp = tsk_calloc(k, sizeof(uint16_t));
+ if(!list1_values) { segfault = 1; goto __SEGFAULT; };
+ for(list_index = 0; list_index < n; list_index++){
+ uint16_t* list_start = (uint16_t*)TCOMP_UDVM_GET_BUFFER_AT( start + (list_index*k*2) );
+ memcpy(list_temp, list_start, k*2);
+ for(list_el=0; list_el<k; list_el++){
+ list_start[(list_el)] = list_temp[ list1_values[list_el].index ];
+ }
+ }
+
+__SEGFAULT:
+ TSK_FREE(list_temp);
+ TSK_FREE(list1_values);
+
+ if(segfault)
+ {
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>SORT-DESCENDING (%start, %n, %k)</i><br><br>
+/// Reference: RFC3320 Section 9.1.3<br>
+///
+/// This instruction sort lists of 2-byte words in descending order.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param start The starting memory address of the block of data to be sorted.
+/// @param n Number of lists.
+/// @param k Lists length (2-byte words).
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SORT_DESCENDING(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)
+{
+ int segfault = 0;
+ uint16_t* list_temp = 0;
+ IndexValuePair_t *list1_values = 0;
+ uint16_t list_index, list_el;
+ int j, pos;
+
+ CONSUME_CYCLES(( 1 + k *(CEILLINGLOG2(k) + n) )); /* 1 + k * (ceiling(log2(k)) + n) */
+
+ if(TCOMP_UDVM_GET_SIZE() <= (tsk_size_t)(start+(n*k*2)) ){ segfault = 1; goto __SEGFAULT; };
+
+ //
+ // Create FirstList with key-value pairs.
+ //
+ list1_values = (IndexValuePair_t*)tsk_calloc(k, sizeof(IndexValuePair_t));
+ if(!list1_values) { segfault = 1; goto __SEGFAULT; };
+ for(j=0, pos=0; pos<k; j+=2,pos++){
+ list1_values[pos].index = pos;
+ list1_values[pos].value = *((uint16_t*)TCOMP_UDVM_GET_BUFFER_AT(start+j));
+ }
+
+ /*
+ * Sort Fisrt List Values.
+ */
+ qsort(list1_values, k, sizeof(IndexValuePair_t), SortDescendingPredicate);
+
+
+ /* Sort all lists. */
+ list_temp = tsk_calloc(k, sizeof(uint16_t));
+ if(!list1_values) { segfault = 1; goto __SEGFAULT; };
+ for(list_index = 0; list_index < n; list_index++){
+ uint16_t* list_start = (uint16_t*)TCOMP_UDVM_GET_BUFFER_AT(start + (list_index*k*2));
+ memcpy(list_temp, list_start, k*2);
+ for(list_el=0; list_el<k; list_el++){
+ list_start[(list_el)] = list_temp[ list1_values[list_el].index ];
+ }
+ }
+
+__SEGFAULT:
+ TSK_FREE(list_temp);
+ TSK_FREE(list1_values);
+
+ if(segfault){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>SHA-1 (%position, %length, %destination)</i><br><br>
+/// Reference: RFC3320 Section 9.1.4<br>
+/// This instruction calculates a 20-byte SHA-1 hash [RFC-3174] over the specified area of UDVM memory.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param position The starting memory address.
+/// @param length The length of the byte string over which the SHA-1 hash is calculated.
+/// @param destination The starting address to which the resulting 20-byte hash will be copied.
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SHA_1(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)
+{
+ tsk_bool_t ok = tsk_true;
+ uint8_t *data = 0;
+
+ tsk_sha1context_t sha;
+ int32_t err;
+ uint8_t Message_Digest[TSK_SHA1_DIGEST_SIZE];
+
+ CONSUME_CYCLES(1+length);
+
+ if(!length || ((destination+length) > (int32_t)TCOMP_UDVM_GET_SIZE())){
+ ok = tsk_false;
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ goto bail;
+ }
+
+ /*
+ * The SHA-1 instruction calculates a 20-byte SHA-1 hash [RFC-3174] over
+ * the specified area of UDVM memory.
+ */
+
+ data = tsk_calloc(length, sizeof(uint8_t));
+ ok &= tcomp_udvm_bytecopy_from(udvm, data, position, length);
+
+ /*
+ * Compute SHA-1
+ */
+ if( (err = tsk_sha1reset(&sha)) ){
+ ok = tsk_false;
+ tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
+ goto bail;
+ }
+ if ( (err = tsk_sha1input(&sha, data, length)) ){
+ ok = tsk_false;
+ tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
+ goto bail;
+ }
+
+ if( (err = tsk_sha1result(&sha, (char*)Message_Digest)) ){
+ ok = tsk_false;
+ tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
+ goto bail;
+ }
+
+ /*
+ * Copy sha1 result to udvm memory
+ */
+ ok &= tcomp_udvm_bytecopy_to(udvm, destination, Message_Digest, TSK_SHA1_DIGEST_SIZE);
+
+bail:
+ TSK_FREE(data);
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>LOAD(%address, %value)</i><br><br>
+/// Reference: RFC3320 Section 9.2.1<br>
+/// This instruction sets a 2-byte word to a certain specified value
+/// As usual, MSBs are stored before LSBs in the UDVM memory.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param address Specifies the starting address of a 2-byte word.
+/// @param value Specifies the value to be loaded into this word.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__LOAD(tcomp_udvm_t *udvm, uint16_t address, uint16_t value)
+{
+ CONSUME_CYCLES(1);
+
+ if( address >= TCOMP_UDVM_GET_SIZE() ){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ TCOMP_UDVM_SET_2BYTES_VAL(address, value);
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>MULTILOAD(%address, \#n, %value_0, ..., %value_n-1)</i><br><br>
+/// Reference: RFC3320 Section 9.2.2<br>
+/// This instruction sets a contiguous block of 2-byte words in the UDVM memory to specified values.
+/// value_0 through to value_n-1 specify the values to load into these words (in the same order as
+/// they appear in the instruction).
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param address Starting address of the contiguous 2-byte words.
+/// @param n Number of 2-bytes values to load.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MULTILOAD(tcomp_udvm_t *udvm, uint16_t address, uint16_t n)
+{
+ uint16_t index, _address;
+
+ CONSUME_CYCLES(1+n);
+
+ if( (address + (2*n)) > udvm->executionPointer && (udvm->executionPointer >= address) ){
+ tcomp_udvm_createNackInfo2(udvm, NACK_MULTILOAD_OVERWRITTEN);
+ return tsk_false;
+ }
+
+ /* FIXME: check for overwritten ==> see Torture test "2.5. LOAD and MULTILOAD" */
+ for(index = 0, _address = address; index < n; index++ , _address += 2){
+ uint16_t value_n = tcomp_udvm_opget_multitype_param(udvm);
+ TCOMP_UDVM_SET_2BYTES_VAL(_address, value_n);
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>PUSH (%value)</i><br><br>
+/// Reference: RFC3320 Section 9.2.3<br>
+/// This instruction pushes the value specified by its operand on the stack..
+///
+
+/// @date 11/27/2009
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param value 2-byte word to push.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__PUSH(tcomp_udvm_t *udvm, int16_t value)
+{
+ tsk_bool_t callback = (value>=0);
+ uint16_t stack_location, stack_fill;
+ if(!callback){
+ value = tcomp_udvm_opget_multitype_param(udvm);
+ }
+
+ CONSUME_CYCLES(callback?0:1);
+
+ stack_location = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_STACK_LOCATION_INDEX);
+ stack_fill = TCOMP_UDVM_GET_2BYTES_VAL(stack_location);
+
+ /*
+ * copying the value to stack[stack_fill]
+ * stack[n] = stack_location+2*n+2
+ */
+ TCOMP_UDVM_SET_2BYTES_VAL((stack_location+(2*stack_fill)+2), value);
+
+ /* increasing stack_fill by 1*/
+ TCOMP_UDVM_SET_2BYTES_VAL(stack_location, (stack_fill+1));
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>POP (%address)</i><br><br>
+/// Reference: RFC3320 Section 9.2.3<br>
+/// This instruction pops a value from the stack and then copies the value to the specified memory address..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param [in,out] value 2-byte word to pop from the stack.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__POP(tcomp_udvm_t *udvm, uint16_t* value)
+{
+ uint16_t address;
+ uint16_t stack_location, stack_fill, _value = 0;
+
+ tsk_bool_t callback = (value != 0);
+
+ CONSUME_CYCLES(callback?0:1);
+
+ address = callback ? 0 : tcomp_udvm_opget_multitype_param(udvm);
+
+ stack_location = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_STACK_LOCATION_INDEX);
+ stack_fill = TCOMP_UDVM_GET_2BYTES_VAL(stack_location);
+
+ /*
+ * Decompression failure occurs if stack_fill is
+ * zero at the commencement of a popping operation. POP and RETURN pop
+ * values from the stack.
+ */
+ if(stack_fill == 0){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ _value = 0;
+ goto end;
+ }
+
+ /*
+ * "Popping" a value from the stack is an abbreviation for decreasing
+ * stack_fill by 1, and then using the value stored in stack[stack_fill].
+ */
+ --stack_fill;
+ TCOMP_UDVM_SET_2BYTES_VAL(stack_location, stack_fill);
+ /* stack[n] = stack_location+2*n+2 */
+ _value = TCOMP_UDVM_GET_2BYTES_VAL( (stack_location + (2*stack_fill) + 2) );
+
+end:
+ if(callback){
+ *value = _value;
+ }
+ else{
+ TCOMP_UDVM_SET_2BYTES_VAL(address, _value);
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>COPY(%position, %length, %destination)</i><br><br>
+/// Reference: RFC3320 Section 9.2.4<br>
+/// This instruction is used to copy a string of bytes from one part of the UDVM memory to another.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param position Specifies the memory address of the first byte in the string to be copied.
+/// @param length Specifies the number of bytes to be copied.
+/// @param destination Gives the address to which the first byte in the string will be copied.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)
+{
+ tsk_bool_t ok = tsk_true;
+
+ CONSUME_CYCLES(1+length);
+
+ if( (position + length) > (int32_t)TCOMP_UDVM_GET_SIZE() || (destination + length) > (int32_t)TCOMP_UDVM_GET_SIZE() ){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ /*
+ * The COPY instruction is used to copy a string of bytes from one part
+ * of the UDVM memory to another.
+ */
+ ok &= tcomp_udvm_bytecopy_self(udvm, &destination, position, length);
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>COPY-LITERAL(%position, %length, $destination)</i><br><br>
+/// Reference: RFC3320 Section 9.2.5<br>
+/// The COPY-LITERAL instruction behaves as a COPY instruction except
+/// that after copying is completed, the value of the destination operand
+/// is replaced by the address to which the next byte of data would be copied..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param position Specifies the memory address of the first byte in the string to be copied.
+/// @param length Specifies the number of bytes to be copied.
+/// @param destination Gives the address to which the first byte in the string will be copied.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY_LITERAL(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)
+{
+ tsk_bool_t ok;
+ uint16_t destination_index;
+
+ CONSUME_CYCLES(1+length);
+
+ destination_index = TCOMP_UDVM_GET_2BYTES_VAL(destination);
+ ok = tcomp_udvm_bytecopy_self(udvm, &destination_index, position, length);
+ if(ok){
+ /* set next byte */
+ TCOMP_UDVM_SET_2BYTES_VAL(destination, destination_index);
+ }
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>COPY-OFFSET(%offset, %length, $destination)</i><br><br>
+/// Reference: RFC3320 Section 9.2.6<br>
+/// This instruction behaves as a COPY-LITERAL instruction
+/// except that an offset operand is given instead of a position operand..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param offset The offset value.
+/// @param length Specifies the number of bytes to be copied.
+/// @param destination Gives the address to which the first byte in the string will be copied.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COPY_OFFSET(tcomp_udvm_t *udvm, uint16_t offset, uint16_t length, uint16_t destination)
+{
+ uint16_t DEST, LEFT, RIGTH;
+ int32_t position = -1;
+ uint16_t destination_index;
+
+ int16_t D, T;
+ uint16_t O;
+
+ CONSUME_CYCLES(1+length);
+
+ DEST = TCOMP_UDVM_GET_2BYTES_VAL(destination);
+ LEFT = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX);
+ RIGTH = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX);
+
+ /*
+ DEST: ses
+ D: distance between LEFT and DEST
+ O: offset
+ T: total size between LEFT and RIGTH
+
+ [*****
+ case 1:
+ -----LEFT--------DEST------------RIGTH----
+ <-----D---->
+ <--O->
+ <---------------T------------>
+ ****]
+ [*****
+ case 2:
+ -----LEFT--------DEST------------RIGTH----
+ <-----D---->
+ <--------O-------->
+ <---------------T------------>
+ ****]
+ [*****
+ case 3:
+ -------DEST-----LEFT-------------RIGTH----
+ ****]
+ */
+ D = (DEST - LEFT);
+ T = (RIGTH - LEFT);
+ O = offset;
+
+ if( D>=0 && O<=D ){
+ /* case 1: easy case */
+ position = (DEST-O);
+ }
+ else if( D>=0 && O>D ){
+ /* case 2: */
+ double PAD = (D + ((ceil(((double)O-(double)D)/(double)T))*T))-O;
+ position = LEFT+(int32_t)PAD;
+ }
+ else if( D<0 ){
+ /* case 3: */
+ position = DEST-O;
+ }
+
+ /* Check position */
+ if(position<0){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ /* EXEC_INST__COPY_LITERAL */
+ destination_index = TCOMP_UDVM_GET_2BYTES_VAL(destination);
+ if(tcomp_udvm_bytecopy_self(udvm, &destination_index, position, length)){
+ TCOMP_UDVM_SET_2BYTES_VAL(destination, destination_index);
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>MEMSET(%address, %length, %start_value, %offset)</i><br><br>
+/// Reference: RFC3320 Section 9.2.7<br>
+/// Formula: Seq[n] := (start_value + n * offset) modulo 256<br>
+/// This instruction initializes an area of UDVM memory to a specified sequence of values.
+///
+
+/// @date 11/27/2009
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param address The destination address.
+/// @param length The number of 1-byte values to set.
+/// @param start_value The starting value.
+/// @param offset The offset used for computation.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__MEMSET(tcomp_udvm_t *udvm, uint16_t address, uint16_t length, uint16_t start_value, uint16_t offset)
+{
+ uint8_t* seqs_temp;
+ uint16_t n;
+ tsk_bool_t ok;
+
+ CONSUME_CYCLES(1+length);
+
+ /*
+ * The values Seq[0] to Seq[length - 1] inclusive are each interpreted
+ * as a single byte, and then concatenated to form a byte string where
+ * the first byte has value Seq[0], the second byte has value Seq[1] and
+ * so on up to the last byte which has value Seq[length - 1].
+ */
+ seqs_temp = tsk_calloc(length, sizeof(uint8_t));
+ if(!seqs_temp){
+ return tsk_false;
+ }
+
+ for(n=0; n < length; n++){
+ seqs_temp[n] = (start_value + n * offset)%256;
+ }
+ /*
+ * The string is then byte copied into the UDVM memory beginning at the
+ * memory address specified as an operand to the MEMSET instruction,
+ * obeying the rules of Section 8.4.
+ */
+ ok = tcomp_udvm_bytecopy_to(udvm, address, seqs_temp, length);
+
+ TSK_FREE(seqs_temp);
+
+ return ok;
+}
+
+/**
+* @brief <i>JUMP (\@address)</i><br><br>
+* Reference: RFC3320 Section 9.3.1<br>
+* This instruction moves program execution to the specified memory address.
+* Decompression failure occurs if the value of the address operand lies
+* beyond the overall UDVM memory size.
+* @param [in,out] udvm The udvm state machine entity.
+* @param address defines the address to jump to
+* @retval 1 if succeed, otherwise returns 0
+*/
+tsk_bool_t TCOMP_UDVM_EXEC_INST__JUMP(tcomp_udvm_t *udvm, int16_t address)
+{
+ int callback = (address >=0 );
+ CONSUME_CYCLES(callback?0:1);
+
+ if(!callback){
+ address = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ }
+
+ if(address > (int32_t)TCOMP_UDVM_GET_SIZE()){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+ udvm->executionPointer = address;
+
+ return tsk_true;
+}
+
+
+/**
+ *
+ * @brief <i>COMPARE(%value_1, %value_2, \@address_1, \@address_2, \@address_3)</i><br><br>
+ * Reference: RFC3320 Section 9.3.2<br>
+ *
+ * This instruction compares two operands and then jumps to one of three specified
+ * memory addresses depending on the result.<br>
+ * if(value_1 < value_2) --> address_1<br>
+ * elif(value_1 = value_2) --> address_2<br>
+ * elif(value_1 > value_2) --> address_3. <br>
+ *
+ *
+ * @param [in,out] udvm The udvm state machine entity.
+ * @param value_1 The first value to compare.
+ * @param value_2 The second value to compare.
+ * @param address_1 The address to jump to if (value_1 < value_2).
+ * @param address_2 The address to jump to if (value_1 = value_2).
+ * @param address_3 address to jump to if (value_1 > value_2).
+ * @retval 1 if succeed, otherwise returns 0.
+**/
+tsk_bool_t TCOMP_UDVM_EXEC_INST__COMPARE(tcomp_udvm_t *udvm, uint16_t value_1, uint16_t value_2, uint16_t address_1, uint16_t address_2, uint16_t address_3)
+{
+ tsk_bool_t ok = 1;
+
+ CONSUME_CYCLES(1);
+
+ if(value_1 < value_2){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address_1);
+ goto end;
+ }
+
+ if(value_1 == value_2){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address_2);
+ goto end;
+ }
+
+ if(value_1 > value_2){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address_3);
+ goto end;
+ }
+
+end:
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>CALL(\@address)</i><br><br>
+/// Reference: RFC3320 Section 9.3.3<br>
+/// This instruction finds the memory address of the instruction immediately following
+/// the CALL instruction and pushes this 2-byte value on the stack, ready for later retrieval.
+/// It then continues instruction execution at the memory address specified by the address operand..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param address The next address.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__CALL(tcomp_udvm_t *udvm, uint16_t address)
+{
+ CONSUME_CYCLES(1);
+
+ TCOMP_UDVM_EXEC_INST__PUSH(udvm, udvm->executionPointer);
+ return TCOMP_UDVM_EXEC_INST__JUMP(udvm, address);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>RETURN</i><br><br>
+/// Reference: RFC3320 Section 9.3.3<br>
+/// This instruction pops a value from the stack and then continues instruction
+/// execution at the memory address just popped..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+///
+/// @retval True if succeed, otherwise return false .
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__RETURN(tcomp_udvm_t *udvm)
+{
+ uint16_t value = 0;
+ tsk_bool_t ok = tsk_true;
+
+ CONSUME_CYCLES(1);
+
+ if( (ok = TCOMP_UDVM_EXEC_INST__POP(udvm, &value)) ){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, value);
+ }
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>SWITCH(\#n, %j, \@address_0, \@address_1, ... , \@address_n-1)</i><br><br>
+/// Reference: RFC3320 Section 9.3.4<br>
+/// This instruction performs a conditional jump based on the value of one of its operands.
+/// Decompression failure occurs if j specifies a value of n or more, or
+/// if the address lies beyond the overall UDVM memory size..
+
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param n The number of possibilities.
+/// @param j The possibility.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__SWITCH(tcomp_udvm_t *udvm, uint16_t n, uint16_t j)
+{
+ uint16_t next = 0;
+ tsk_bool_t ok = tsk_true;
+
+ CONSUME_CYCLES(1+n);
+
+ /* Decompression failure occurs if j specifies a value of n or more. */
+ if(j >= n){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SWITCH_VALUE_TOO_HIGH);
+ ok = tsk_false;
+ goto end;
+ }
+
+ do{
+ next = tcomp_udvm_opget_address_param(udvm, udvm->last_memory_address_of_instruction);
+ }
+ while(j--);
+
+end:
+ if(ok){
+ ok = TCOMP_UDVM_EXEC_INST__JUMP(udvm, next);
+ }
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>CRC(%value, %position, %length, \@address)</i><br><br>
+/// Reference: RFC3320 Section 9.3.5<br>
+/// This instruction verifies a string of bytes using a 2-byte CRC.
+/// The CRC value is computed exactly as defined for the 16-bit FCS calculation in [RFC-1662]..
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param value Contains the expected integer value of the 2-byte CRC.
+/// @param position Defines the position of the string of bytes over which the CRC is evaluated.
+/// @param length Defines the length of the string of bytes over which the CRC is evaluated.
+/// @param address The address to jump to if the calculated CRC value do not match.
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__CRC(tcomp_udvm_t *udvm, uint16_t value, uint16_t position, uint16_t length, uint16_t address)
+{
+ tsk_bool_t ok = tsk_true;
+ uint8_t* data;
+ uint16_t crc_value;
+
+ CONSUME_CYCLES(1+length);
+
+ data = tsk_calloc(length, sizeof(uint8_t));
+ if(!data){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
+ return tsk_false;
+ }
+
+ /* copy data */
+ ok &= tcomp_udvm_bytecopy_from(udvm, data, position, length);
+
+ /*
+ * The CRC value is computed exactly as defined for the 16-bit FCS
+ * calculation in [RFC-1662]
+ */
+ crc_value = tsk_pppfcs16(TSK_PPPINITFCS16, data, length);
+
+ /* delete data */
+ TSK_FREE(data);
+
+ /*
+ * If the calculated CRC matches the expected value then the UDVM
+ * continues instruction execution at the following instruction.
+ * Otherwise the UDVM jumps to the memory address specified by the
+ * address operand.
+ */
+ if(value != crc_value){
+ TCOMP_UDVM_EXEC_INST__JUMP(udvm, address);
+ }
+
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>INPUT-BYTES (%length, %destination, \@address)</i><br><br>
+/// Reference: RFC3320 Section 9.4.2<br>
+/// This instruction requests a certain number of bytes of compressed data from the decompressor dispatcher.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param length Indicates the requested number of bytes of compressed data.
+/// @param destination Specifies the starting memory address to which they should be copied.
+/// @param address Defines the address to jump to if the instruction requests data that lies beyond the end of the SigComp message.
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_BYTES(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)
+{
+ tsk_bool_t ok = tsk_true;
+ const uint8_t* compressedDataAddress;
+ uint8_t* destinationAddress;
+
+ CONSUME_CYCLES(1+length);
+
+ /*
+ * If the INPUT-BYTES is encountered after an INPUT-BITS or an INPUT-
+ * HUFFMAN instruction has been used, and the dispatcher currently holds
+ * a fraction of a byte, then the fraction MUST be discarded before any
+ * data is passed to the UDVM. The first byte to be passed is the byte
+ * immediately following the discarded data.
+ */
+ tcomp_buffer_discardBits(udvm->sigCompMessage->remaining_sigcomp_buffer);
+
+ compressedDataAddress = tcomp_buffer_readBytes(udvm->sigCompMessage->remaining_sigcomp_buffer, length);
+ destinationAddress = TCOMP_UDVM_GET_BUFFER_AT(destination);
+ if(compressedDataAddress){
+ ok &= tcomp_udvm_bytecopy_to(udvm, destination, compressedDataAddress, length);
+ if(ok){
+ /* (8 * n + 1000) * cycles_per_bit */
+ udvm->maximum_UDVM_cycles += ((8*length+1000) * udvm->stateHandler->sigcomp_parameters->cpbCode);
+ }
+ }
+ else{
+ /*
+ * If the instruction requests data that lies beyond the end of the
+ * SigComp message, no data is returned. Instead the UDVM moves program
+ * execution to the address specified by the address operand.
+ */
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address);
+ }
+
+ return ok;
+}
+
+/**
+ *
+ * @brief <i>INPUT-BITS (%length, %destination, \@address)</i><br><br>
+ * Reference: RFC3320 Section 9.4.3<br>
+ * The INPUT-BITS instruction requests a certain number of bits of
+ * compressed data from the decompressor dispatcher.
+ *
+ *
+ * @param [in,out] udvm The udvm state machine entity.
+ * @param length The length operand indicates the requested number of bits.
+ Decompression failure occurs if this operand does not lie between 0
+ and 16 inclusive.
+ * @param destination The destination operand specifies the memory address to which the
+ compressed data should be copied. Note that the requested bits are
+ interpreted as a 2-byte integer ranging from 0 to 2^length - 1, as
+ explained in Section 8.2.
+
+ * @param address The address of the destination.
+ *
+ * @retval 1 if succeed, otherwise returns 0.
+**/
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_BITS(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)
+{
+ tsk_bool_t ok = tsk_true;
+ uint16_t input_bit_order, reserved;
+ uint8_t F_BIT, P_BIT;
+ uint8_t* old_P_BIT;
+
+ /*
+ The input_bit_order register contains the following three flags:
+ 0 7 8 15
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | reserved |F|H|P| 68 - 69
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ CONSUME_CYCLES(1);
+
+ input_bit_order = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_INPUT_BIT_ORDER_INDEX);
+ reserved = (input_bit_order & 0xf8);
+ /*
+ * Decompression failure occurs if an INPUT-BITS or an INPUT-HUFFMAN
+ * instruction is encountered and the input_bit_order register does not
+ * lie between 0 and 7 inclusive.
+ */
+ if(reserved){
+ /* MUST BE ZEROS --> Only 3bits --> [0-7] */
+ tcomp_udvm_createNackInfo2(udvm, NACK_BAD_INPUT_BITORDER);
+ return tsk_false;
+ }
+
+ /* F and P BITS */
+ F_BIT = (input_bit_order & 0x0004) ? 1 : 0;
+ P_BIT = (input_bit_order & 0x0001);
+
+ /*
+ * Decompression failure occurs if this operand (length) does not lie between 0
+ * and 16 inclusive.
+ */
+ if(/*length<0 ||*/ length>16){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_OPERAND);
+ return tsk_false;
+ }
+
+ /*
+ * P:The P-bit controls the order in which bits are passed from the
+ * dispatcher to the INPUT instructions
+ * P=0 --> MSB_TO_LSB
+ * P=1 --> LSB_TO_MSB
+ */
+ old_P_BIT = tcomp_buffer_getP_BIT(udvm->sigCompMessage->remaining_sigcomp_buffer);
+ if(*old_P_BIT != P_BIT){
+ /*
+ * If the P-bit has changed since the last INPUT instruction, any fraction of a
+ * byte still held by the dispatcher MUST be discarded (even if the
+ * INPUT instruction requests zero bits)
+ */
+ tcomp_buffer_discardBits(udvm->sigCompMessage->remaining_sigcomp_buffer);
+ *old_P_BIT = P_BIT;
+ }
+
+ /*
+ * If the instruction requests data that lies beyond the end of the
+ * SigComp message, no data is returned. Instead the UDVM moves program
+ * execution to the address specified by the address operand.
+ */
+ if( (length) > tcomp_buffer_getRemainingBits(udvm->sigCompMessage->remaining_sigcomp_buffer) ){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address);
+ goto end;
+ }
+
+ /*
+ * If the F-bit is set to 0, the INPUT-BITS instruction interprets the
+ * received bits as arriving MSBs first, and if it is set to 1, it interprets the bits as arriving LSBs first.
+ * F=0 --> MSB_TO_LSB
+ * F=1 --> LSB_TO_MSB
+ */
+ if(P_BIT == TCOMP_P_BIT_MSB_TO_LSB){
+ /* MSB_TO_LSB */
+ uint16_t value = tcomp_buffer_readMsbToLsb(udvm->sigCompMessage->remaining_sigcomp_buffer, length);
+ if(F_BIT == F_BIT_LSB_TO_MSB){
+ value = (TSK_BINARY_REVERSE_2BYTE(value)>>(16-length));
+ }
+ TCOMP_UDVM_SET_2BYTES_VAL(destination, value);
+ }
+ else{
+ /* LSB_TO_MSB */
+ uint16_t value = tcomp_buffer_readLsbToMsb(udvm->sigCompMessage->remaining_sigcomp_buffer, length);
+ if(F_BIT == F_BIT_LSB_TO_MSB) {
+ value = (TSK_BINARY_REVERSE_2BYTE(value)>>(16-length));
+ }
+ TCOMP_UDVM_SET_2BYTES_VAL(destination, value);
+ }
+
+end:
+
+ udvm->maximum_UDVM_cycles += (length * udvm->stateHandler->sigcomp_parameters->cpbValue);
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>INPUT-HUFFMAN(%destination, \@address, \#n, %bits_1, %lower_bound_1, %upper_bound_1, %uncompressed_1, ... , %bits_n, %lower_bound_n, %upper_bound_n, %uncompressed_n)</i><br><br>
+/// Reference: RFC3320 Section 9.4.4<br>
+///
+/// This instruction requests a variable number of bits of compressed data from the decompressor dispatcher. The instruction
+/// initially requests a small number of bits and compares the result against a certain criterion; if the criterion is not met, then
+/// additional bits are requested until the criterion is achieved.
+///
+/// @param [in,out] udvm The udvm state machine entity.
+/// @param destination The udvm destination address.
+/// @param address Address to jump to if data is requested that lies beyond the end of the SigComp message.
+/// @param n Additional sets of operands count.
+///
+/// @retval True if succeed, otherwise return false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__INPUT_HUFFMAN(tcomp_udvm_t *udvm, uint16_t destination, uint16_t address, uint16_t n)
+{
+ /*
+ The input_bit_order register contains the following three flags:
+ 0 7 8 15
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | reserved |F|H|P| 68 - 69
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+ tsk_bool_t ok = tsk_true;
+ uint16_t input_bit_order, reserved;
+ uint8_t H_BIT, P_BIT, *old_P_BIT;
+
+ uint16_t bits_j, lower_bound_j, upper_bound_j, uncompressed_j;
+ uint16_t bits_total = 0, k = 0, H, J;
+ tsk_bool_t criterion_ok = tsk_false;
+
+ CONSUME_CYCLES(1+n);
+
+ /*Note that if n = 0 then the INPUT-HUFFMAN instruction is ignored and
+ program execution resumes at the following instruction.*/
+ if(n == 0){
+ //goto end;
+ return ok;
+ }
+
+ input_bit_order = TCOMP_UDVM_GET_2BYTES_VAL(TCOMP_UDVM_HEADER_INPUT_BIT_ORDER_INDEX);
+ reserved = (input_bit_order & 0xf8);
+ /*
+ * Decompression failure occurs if an INPUT-BITS or an INPUT-HUFFMAN
+ * instruction is encountered and the input_bit_order register does not
+ * lie between 0 and 7 inclusive.
+ */
+ if(reserved){
+ /* MUST BE ZEROS --> Only 3bits --> [0-7] */
+ tcomp_udvm_createNackInfo2(udvm, NACK_BAD_INPUT_BITORDER);
+ return tsk_false;
+ }
+
+ /* H and P */
+ H_BIT = (input_bit_order & 0x0002)?1:0;
+ P_BIT = (input_bit_order & 0x0001);
+
+ /*
+ * P:The P-bit controls the order in which bits are passed from the
+ * dispatcher to the INPUT instructions
+ * P=0 --> MSB_TO_LSB
+ * P=1 --> LSB_TO_MSB
+ */
+ old_P_BIT = tcomp_buffer_getP_BIT(udvm->sigCompMessage->remaining_sigcomp_buffer);
+ if( *old_P_BIT != P_BIT ){
+ /*
+ * If the P-bit has changed since the last INPUT instruction, any fraction of a
+ * byte still held by the dispatcher MUST be discarded (even if the
+ * INPUT instruction requests zero bits)
+ */
+ tcomp_buffer_discardBits(udvm->sigCompMessage->remaining_sigcomp_buffer);
+ *old_P_BIT = P_BIT;
+ }
+
+ /*
+ * HUFFMAN COMPUTATION
+ */
+
+ /* 1. Set j := 1 and set H := 0. */
+ for(J = 1, H = 0; J<=n; J++){
+ /*
+ * Request bits_j compressed bits. Interpret the returned bits as an
+ * integer k from 0 to 2^bits_j - 1, as explained in Section 8.2.
+ */
+ bits_j = tcomp_udvm_opget_multitype_param(udvm);
+ lower_bound_j = tcomp_udvm_opget_multitype_param(udvm);
+ upper_bound_j = tcomp_udvm_opget_multitype_param(udvm);
+ uncompressed_j = tcomp_udvm_opget_multitype_param(udvm);
+ bits_total += bits_j;
+
+ /*Decompression failure occurs if (bits_1 + ... + bits_n) > 16.*/
+ if(bits_total > 16){
+ ok = tsk_false;
+ // FIXME: DECOMPRESSION failure TOO_MANY_BITS_REQUESTED
+ goto end;
+ }
+
+ if(criterion_ok){
+ continue;
+ }
+
+//==step_4:
+ /*
+ * 4.If data is requested that lies beyond the end of the SigComp
+ * message, terminate the INPUT-HUFFMAN instruction and move program
+ * execution to the memory address specified by the address operand.
+ */
+ if( (bits_j) > tcomp_buffer_getRemainingBits(udvm->sigCompMessage->remaining_sigcomp_buffer) ){
+ ok &= TCOMP_UDVM_EXEC_INST__JUMP(udvm, address);
+ goto end;
+ }
+
+//==step_2:
+ /*
+ * 2. Request bits_j compressed bits. Interpret the returned bits as an
+ * integer k from 0 to 2^bits_j - 1, as explained in Section 8.2.
+ */
+ if(P_BIT == TCOMP_P_BIT_MSB_TO_LSB){
+ k = tcomp_buffer_readMsbToLsb(udvm->sigCompMessage->remaining_sigcomp_buffer, bits_j);
+ if(H_BIT == H_BIT_LSB_TO_MSB) {
+ k = (TSK_BINARY_REVERSE_2BYTE(k)>>(16-bits_j));
+ }
+ }
+ else{
+ k = tcomp_buffer_readLsbToMsb(udvm->sigCompMessage->remaining_sigcomp_buffer, bits_j);
+ if(H_BIT == H_BIT_LSB_TO_MSB){
+ k = (TSK_BINARY_REVERSE_2BYTE(k)>>(16-bits_j));
+ }
+ }
+//==step_3:
+ /* 3. Set H := H * 2^bits_j + k */
+ H = H * (uint16_t)pow(2.0, bits_j) + k;
+
+//==step_5:
+ /*
+ * 5. If (H < lower_bound_j) or (H > upper_bound_j) then set j := j + 1.
+ * Then go back to Step 2, unless j > n in which case decompression
+ * failure occurs.
+ */
+ if( (H < lower_bound_j) || (H > upper_bound_j) ){
+ continue;
+ //goto step_2;
+ }
+ else{
+ /*
+ * Copy (H + uncompressed_j - lower_bound_j) modulo 2^16 to the
+ * memory address specified by the destination operand.
+ */
+ H = (H + uncompressed_j - lower_bound_j) % 65536;
+ criterion_ok = 1;
+ }
+ }
+
+ if(!criterion_ok){
+ tcomp_udvm_createNackInfo2(udvm, NACK_HUFFMAN_NO_MATCH);
+ ok = tsk_false;
+ goto end;
+ }
+ else if(ok){
+ TCOMP_UDVM_SET_2BYTES_VAL(destination, H);
+ udvm->maximum_UDVM_cycles += (bits_total * udvm->stateHandler->sigcomp_parameters->cpbValue);
+ }
+end:
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>STATE-ACCESS(%partial_identifier_start, %partial_identifier_length, %state_begin, %state_length, %state_address, %state_instruction)</i><br><br>
+/// Reference: RFC3320 Section 9.4.5<br>
+/// This instruction retrieves some previously stored state information..
+
+/// @param [in,out] udvm If non-null, the udvm.
+/// @param partial_identifier_start Specifies the location of the partial state identifier used to retrieve the state information.
+/// @param partial_identifier_length Specifies the length of the partial state identifier used to retrieve the state information.
+/// @param state_begin Defines the starting byte to copy from the state_value contained in the returned item of state.
+/// @param state_length Defines the number of bytes to copy from the state_value contained in the returned item of state.
+/// @param state_address Contains a UDVM memory address.
+/// @param state_instruction Next instruction to jump to.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_ACCESS(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length, uint16_t state_begin, uint16_t state_length, uint16_t state_address, uint16_t state_instruction)
+{
+ tcomp_state_t* lpState = NULL;
+ tcomp_buffer_handle_t* partial_id;
+ uint16_t match_count;
+
+ /*
+ * Decompression failure occurs if partial_identifier_length does not
+ * lie between 6 and 20 inclusive.
+ */
+ if(partial_identifier_length<6 || partial_identifier_length>20){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_STATE_ID_LENGTH);
+ return tsk_false;
+ }
+ /*
+ * decompression failure will always occur if the state_length operand
+ * is set to 0 but the state_begin operand is non-zero.
+ */
+ if(!state_length && state_begin){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_STATE_PROBE);
+ return tsk_false;
+ }
+
+ /*
+ * Find matching state
+ */
+ partial_id = tcomp_buffer_create_null();
+ tcomp_buffer_referenceBuff(partial_id, TCOMP_UDVM_GET_BUFFER_AT(partial_identifier_start), partial_identifier_length);
+ match_count = tcomp_statehandler_findState(udvm->stateHandler, partial_id, &lpState);
+
+ /*
+ * Decompression failure occurs if no state item matching the partial state identifier can be found, if
+ * more than one state item matches the partial identifier.
+ */
+ if(!lpState || !match_count || match_count>1){
+ tcomp_udvm_createNackInfo3(udvm, (match_count>1) ? NACK_ID_NOT_UNIQUE : NACK_STATE_NOT_FOUND, partial_id);
+ TSK_OBJECT_SAFE_FREE(partial_id);
+ return tsk_false;
+ }
+ else if(partial_identifier_length < lpState->minimum_access_length){
+ /*
+ * Decompression failure occurs if partial_identifier_length is less than the minimum_access_length of
+ * the matched state item.
+ */
+ tcomp_udvm_createNackInfo3(udvm, NACK_STATE_NOT_FOUND, partial_id);
+ TSK_OBJECT_SAFE_FREE(partial_id);
+ return tsk_false;
+ }
+ TSK_OBJECT_SAFE_FREE(partial_id);
+
+ /*
+ * If any of the operands state_address, state_instruction or
+ * state_length is set to 0 then its value is taken from the returned
+ * item of state instead.
+ */
+ if(!state_address) {
+ state_address = lpState->address;
+ }
+ if(!state_instruction) {
+ state_instruction = lpState->instruction;
+ }
+ if(!state_length) {
+ state_length = lpState->length;
+ }
+
+ CONSUME_CYCLES(1+state_length);
+
+ /* Decompression failure occurs if bytes are copied from beyond the end of the state_value. */
+ if((tsk_size_t)(state_begin + state_length) > tcomp_buffer_getSize(lpState->value)){
+ tcomp_udvm_createNackInfo3(udvm, NACK_STATE_TOO_SHORT, partial_id);
+ return tsk_false;
+ }
+
+ /*
+ * The state_address operand contains a UDVM memory address. The
+ * requested portion of the state_value is byte copied to this memory
+ * address using the rules of Section 8.4.
+ */
+ tcomp_udvm_bytecopy_to(udvm, state_address, tcomp_buffer_getBufferAtPos(lpState->value, state_begin), state_length);
+
+ /*
+ * Program execution then resumes at the memory address specified by
+ * state_instruction, unless this address is 0 in which case program
+ * execution resumes at the next instruction following the STATE-ACCESS
+ * instruction.
+ */
+ if(state_instruction){
+ if(!TCOMP_UDVM_EXEC_INST__JUMP(udvm, state_instruction)){
+ return tsk_false;
+ }
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>STATE-CREATE (%state_length, %state_address, %state_instruction, %minimum_access_length, %state_retention_priority)</i><br><br>
+/// Reference: RFC3320 Section 9.4.6<br>
+/// This instruction requests the creation of a state item at the receiving endpoint..
+
+/// @param [in,out] udvm If non-null, the udvm.
+/// @param state_length Defines the length of the state to create.
+/// @param state_address Defines the udvm address of the state to create.
+/// @param state_instruction Defines the state instruction.
+/// @param minimum_access_length Defines the minimun access length.
+/// @param state_retention_priority Defines the state retenion priority.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_CREATE(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)
+{
+ CONSUME_CYCLES(1 + state_length);
+
+ /*
+ * Create temporary state?
+ */
+ if(!tcomp_udvm_createTempState(udvm, state_length, state_address, state_instruction,
+ minimum_access_length, state_retention_priority, 0)){
+ return tsk_false;
+ }
+
+ return tsk_true;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i>STATE-FREE(%partial_identifier_start, %partial_identifier_length)</i><br><br>
+/// Reference: RFC3320 Section 9.4.7<br>
+/// This instruction informs the receiving endpoint that the sender no longer wishes to use a particular state item..
+
+/// @param [in,out] udvm If non-null, the udvm.
+/// @param partial_identifier_start Defines the first byte address of partial start identifier.
+/// @param partial_identifier_length Defines the partial identifier length.
+///
+/// @retval True if succeed, otherwise return false .
+////////////////////////////////////////////////////////////////////////////////////////////////////
+tsk_bool_t TCOMP_UDVM_EXEC_INST__STATE_FREE(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length)
+{
+ tcomp_tempstate_to_free_t *lpDesc;
+
+ CONSUME_CYCLES(1);
+
+ /*
+ * Decompression failure MUST occur if more than four state free
+ * requests are made before the END-MESSAGE instruction is encountered.
+ */
+ if(tcomp_result_getTempStatesToFreeSize(udvm->lpResult) >=4){
+ tcomp_udvm_createNackInfo2(udvm, NACK_TOO_MANY_STATE_REQUESTS);
+ return tsk_false;
+ }
+
+ /*
+ * Decompression failure also occurs if partial_identifier_length does
+ * not lie between 6 and 20 inclusive.
+ */
+ if(partial_identifier_length<6 || partial_identifier_length>20){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_STATE_ID_LENGTH);
+ return tsk_false;
+ }
+
+ lpDesc = tcomp_tempstate_to_free_create();
+ lpDesc->partial_identifier_length = partial_identifier_length;
+ lpDesc->partial_identifier_start = partial_identifier_start;
+ tcomp_result_addTempStateToFree(udvm->lpResult, lpDesc);
+
+ /*** Do not ByteCopy data, wait for END_MESSAGE --> see RFC 3320 subclause 9.4.9 **/
+
+ return tsk_true;
+}
+
+/**
+* @brief <i>OUTPUT (%output_start, %output_length)</i><br><br>
+* Reference: RFC3320 Section 9.4.8<br>
+* This instruction provides successfully decompressed data to the dispatcher.
+* @param [in,out] udvm The udvm state machine entity.
+* @param output_start defines the starting memory address of the byte string to be provided to the dispatcher
+* @param output_length defines the length of the byte string to be provided to the dispatcher
+* @retval 1 if succeed, otherwise returns 0
+*/
+tsk_bool_t TCOMP_UDVM_EXEC_INST__OUTPUT(tcomp_udvm_t *udvm, uint16_t output_start, uint16_t output_length)
+{
+ tsk_bool_t ok;
+ tsk_size_t *outputbuffer_size;
+
+ CONSUME_CYCLES(1+output_length);
+
+ outputbuffer_size = tcomp_buffer_getIndexBytes(udvm->lpResult->output_buffer);
+ if( (*outputbuffer_size + output_length) > 65536 ){
+ /*
+ * Decompression failure occurs if the cumulative number of bytes
+ * provided to the dispatcher exceeds 65536 bytes.
+ */
+ tcomp_udvm_createNackInfo2(udvm, NACK_OUTPUT_OVERFLOW);
+ return tsk_false;
+ }
+
+ // FIXME: do it once?
+ ok = tcomp_udvm_bytecopy_from(udvm, tcomp_buffer_getBufferAtPos(udvm->lpResult->output_buffer, *outputbuffer_size), output_start, output_length);
+ *outputbuffer_size += output_length;
+
+#if DEBUG || _DEBUG
+ //tcomp_buffer_nprint(udvm->lpResult->output_buffer, *outputbuffer_size);
+#endif
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @brief <i> END-MESSAGE (%requested_feedback_location, %returned_parameters_location, %state_length, %state_address, %state_instruction, %minimum_access_length, %state_retention_priority)</i><br><br>
+/// Reference: RFC3320 Section 9.4.9<br>
+/// This instruction successfully terminates the UDVM and forwards the state creation and state free requests to the state
+/// handler together with any supplied feedback data.
+///
+/// @param [in,out] udvm Defines the requested feedback location.
+/// @param requested_feedback_location The requested feedback location.
+/// @param returned_parameters_location Defines the returned parameters location which contains remote party capabilities.
+/// @param state_length Length of the state to create.
+/// @param state_address UDVM memory address of the state to create.
+/// @param state_instruction Defines the state instruction.
+/// @param minimum_access_length Defines the state's minimum access length.
+/// @param state_retention_priority Determines the order in which state will be deleted when the compartment exceeds its allocated state memory.
+///
+/// @retval @a tsk_true if succeed, otherwise returns @a tsk_false.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+tsk_bool_t TCOMP_UDVM_EXEC_INST__END_MESSAGE(tcomp_udvm_t *udvm, uint16_t requested_feedback_location, uint16_t returned_parameters_location, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)
+{
+ tsk_size_t udvm_size;
+
+ CONSUME_CYCLES(1+state_length);
+
+ udvm_size = TCOMP_UDVM_GET_SIZE();
+
+ /*
+ * Create temporary state provided by END_MESSAGE?
+ */
+ if(!tcomp_udvm_createTempState(udvm, state_length, state_address, state_instruction, minimum_access_length, state_retention_priority, 1)){
+ return tsk_false;
+ }
+
+ /*
+ * Byte copy all waiting STATE-FREE/STATE-CREATE/END-MESSAGE states
+ */
+ if(!tcomp_udvm_byteCopy_TempStates(udvm)){
+ tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
+ return tsk_false;
+ }
+
+ /*
+ * Feedback has been requested?
+ */
+ if(requested_feedback_location){
+ uint8_t r_f_l;
+ if(requested_feedback_location >= udvm_size){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+ /*
+ 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+
+ | reserved | Q | S | I | requested_feedback_location
+ +---+---+---+---+---+---+---+---+
+ | |
+ : requested feedback item : if Q = 1
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+ r_f_l = *TCOMP_UDVM_GET_BUFFER_AT(requested_feedback_location);
+ udvm->lpResult->req_feedback->I = (r_f_l & 0x01);
+ udvm->lpResult->req_feedback->S = (r_f_l & 0x02) ? 1 : 0;
+ udvm->lpResult->req_feedback->Q = (r_f_l & 0x04) ? 1 : 0;
+
+ requested_feedback_location++; /* skip 1-byte header */
+ if(udvm->lpResult->req_feedback->Q){
+ /* we have a requested feedback item */
+ uint8_t r_f_i = *TCOMP_UDVM_GET_BUFFER_AT(requested_feedback_location);
+ uint8_t length = 1; /* [1-128] */
+ if(r_f_i & 0x80){
+ /* case 2 */
+ length += (r_f_i & 0x7f); /* seven last bits */
+ }
+
+ if(requested_feedback_location >= TCOMP_UDVM_GET_SIZE()){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+ /* copy from udvm */
+ // FIXME: use realloc
+ tcomp_buffer_freeBuff(udvm->lpResult->req_feedback->item);
+ tcomp_buffer_allocBuff(udvm->lpResult->req_feedback->item, length);
+ tcomp_udvm_bytecopy_from(udvm, tcomp_buffer_getBuffer(udvm->lpResult->req_feedback->item), requested_feedback_location, length);
+ }
+ }
+
+ //
+ // SigComp parameters have been returned?
+ //
+ if(returned_parameters_location){
+ uint8_t r_p_l, SigComp_version;
+ uint16_t index;
+ tcomp_buffer_handle_t *partial_id;
+
+ /*
+ 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+
+ | cpb | dms | sms | returned_parameters_location
+ +---+---+---+---+---+---+---+---+
+ | SigComp_version |
+ +---+---+---+---+---+---+---+---+
+ | length_of_partial_state_ID_1 |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : partial_state_identifier_1 :
+ | |
+ +---+---+---+---+---+---+---+---+
+ : :
+ +---+---+---+---+---+---+---+---+
+ | length_of_partial_state_ID_n |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : partial_state_identifier_n :
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+
+ if(returned_parameters_location >= udvm_size){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+
+ /* cpb+dms+sms */
+ r_p_l = *TCOMP_UDVM_GET_BUFFER_AT(returned_parameters_location);
+ returned_parameters_location++;
+ if(r_p_l){
+ tcomp_params_setCpbCode(udvm->lpResult->remote_parameters, ((r_p_l & 0xc0)>>6));
+ tcomp_params_setDmsCode(udvm->lpResult->remote_parameters, ((r_p_l & 0x38)>>3));
+ tcomp_params_setSmsCode(udvm->lpResult->remote_parameters, (r_p_l & 0x07));
+ }
+ /* sigcomp version */
+ SigComp_version = *TCOMP_UDVM_GET_BUFFER_AT(returned_parameters_location);
+ returned_parameters_location++;
+ if(SigComp_version){
+ udvm->lpResult->remote_parameters->SigComp_version = SigComp_version;
+ }
+ /* state items */
+ for(index = returned_parameters_location; index <(udvm_size-1); ){
+ uint8_t length = *TCOMP_UDVM_GET_BUFFER_AT(index); // 1-byte
+ if(length<6 || length>20){
+ break;
+ }
+ index++;
+ if((index+length) >= (uint16_t)udvm_size){
+ tcomp_udvm_createNackInfo2(udvm, NACK_SEGFAULT);
+ return tsk_false;
+ }
+ partial_id = tcomp_buffer_create_null();
+ tcomp_buffer_allocBuff(partial_id, length);
+ tcomp_udvm_bytecopy_from(udvm, tcomp_buffer_getBuffer(partial_id), index, length);
+ if(!udvm->lpResult->remote_parameters->returnedStates){
+ udvm->lpResult->remote_parameters->returnedStates = tsk_list_create();
+ }
+ tsk_list_push_back_data(udvm->lpResult->remote_parameters->returnedStates, (void**)&partial_id);
+ index += length;
+ }
+ }
+
+ return tsk_true;
+}
+
diff --git a/tinySIGCOMP/src/tcomp_udvm.nack.c b/tinySIGCOMP/src/tcomp_udvm.nack.c
new file mode 100644
index 0000000..f422076
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.nack.c
@@ -0,0 +1,112 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.nack.c
+ * @brief SigComp UDVM machine (NACK).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+
+#include "tsk_sha1.h"
+
+void tcomp_udvm_createNackInfo(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buffer_handle_t* lpDetails, int16_t memory_address_of_instruction)
+{
+#define NACK_HEADER_INDEX 0
+#define NACK_VERSION_INDEX (NACK_HEADER_INDEX+2)
+#define NACK_REASON_CODE_INDEX (NACK_VERSION_INDEX+1)
+#define NACK_OPCODE_INDEX (NACK_REASON_CODE_INDEX+1)
+#define NACK_PC_INDEX (NACK_OPCODE_INDEX+1)
+#define NACK_SHA1_INDEX (NACK_PC_INDEX+2)
+#define NACK_DETAILS_INDEX (NACK_PC_INDEX+SHA1HashSize)
+ /* 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+
+ | 1 1 1 1 1 | T | 0 |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : returned feedback item :
+ | |
+ +---+---+---+---+---+---+---+---+
+ | code_len = 0 |
+ +---+---+---+---+---+---+---+---+
+ | code_len = 0 | version = 1 |
+ +---+---+---+---+---+---+---+---+
+ | Reason Code |
+ +---+---+---+---+---+---+---+---+
+ | OPCODE of failed instruction |
+ +---+---+---+---+---+---+---+---+
+ | PC of failed instruction |
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : SHA-1 Hash of failed message :
+ | |
+ +---+---+---+---+---+---+---+---+
+ | |
+ : Error Details :
+ | |
+ +---+---+---+---+---+---+---+---+
+ */
+
+ uint16_t mem_add_instruction = (memory_address_of_instruction >=0) ? memory_address_of_instruction : udvm->last_memory_address_of_instruction;
+ tsk_sha1context_t sha;
+ uint8_t *nackbuffer_ptr;
+
+ tcomp_buffer_allocBuff(udvm->lpResult->nack_info, NACK_SHA1_INDEX + TSK_SHA1_DIGEST_SIZE);
+ nackbuffer_ptr = tcomp_buffer_getBuffer(udvm->lpResult->nack_info);
+
+ nackbuffer_ptr[NACK_HEADER_INDEX] = 0xf8;
+ nackbuffer_ptr[NACK_VERSION_INDEX] = NACK_VERSION;
+ nackbuffer_ptr[NACK_REASON_CODE_INDEX] = reasonCode;
+ nackbuffer_ptr[NACK_OPCODE_INDEX] = *TCOMP_UDVM_GET_BUFFER_AT(mem_add_instruction);
+ nackbuffer_ptr[NACK_PC_INDEX] = (mem_add_instruction >> 8);
+ nackbuffer_ptr[NACK_PC_INDEX+1] = (mem_add_instruction & 0x00ff);
+
+ /*
+ * SHA-1 computation
+ */
+ tsk_sha1reset(&sha);
+ tsk_sha1input(&sha, udvm->sigCompMessage->startPtr, udvm->sigCompMessage->totalSize);
+ tsk_sha1result(&sha, (char*)(nackbuffer_ptr + NACK_SHA1_INDEX));
+
+ /*
+ * Details
+ */
+ if(lpDetails && tcomp_buffer_getSize(lpDetails))
+ {
+ tcomp_buffer_appendBuff(udvm->lpResult->nack_info, tcomp_buffer_getBuffer(lpDetails), tcomp_buffer_getSize(lpDetails));
+ }
+ else if(reasonCode == NACK_BYTECODES_TOO_LARGE)
+ {
+ uint16_t memorySize = TCOMP_UDVM_GET_SIZE();
+ tcomp_buffer_appendBuff(udvm->lpResult->nack_info, &memorySize, 2);
+ }
+ else if(reasonCode == NACK_CYCLES_EXHAUSTED)
+ {
+ uint8_t cpb = udvm->stateHandler->sigcomp_parameters->cpbValue;
+ tcomp_buffer_appendBuff(udvm->lpResult->nack_info, &cpb, 1);
+ }
+
+ udvm->lpResult->isNack = 1;
+}
diff --git a/tinySIGCOMP/src/tcomp_udvm.operands.c b/tinySIGCOMP/src/tcomp_udvm.operands.c
new file mode 100644
index 0000000..8cee95a
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.operands.c
@@ -0,0 +1,261 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.operands.c
+ * @brief SigComp UDVM machine (Operands).
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+
+#include "tsk_debug.h"
+
+#include <math.h>
+
+/**
+literal (#)<br>
+<table>
+<tr> <td>Bytecode</td> <td>Operand value</td> <td>Range</td></tr>
+<tr> <td>0nnnnnnn</td> <td>N</td> <td>0 - 127</td></tr>
+<tr> <td>10nnnnnn nnnnnnnn</td> <td>N</td> <td>0 - 16383</td></tr>
+<tr> <td>11000000 nnnnnnnn nnnnnnnn</td> <td>N</td> <td>0 - 65535</td></tr>
+</table>
+*/
+uint16_t tcomp_udvm_opget_literal_param(tcomp_udvm_t *udvm)
+{
+ uint16_t result = 0;
+ const uint8_t* memory_ptr = TCOMP_UDVM_GET_BUFFER_AT(udvm->executionPointer);
+
+ switch( *memory_ptr & 0xc0) // 2 first bits
+ {
+ case 0x00: // 0nnnnnnn N 0 - 127
+ case 0x40: // 0nnnnnnn N 0 - 127
+ {
+ result = *(memory_ptr);
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 0x80: // 10nnnnnn nnnnnnnn N 0 - 16383
+ {
+ result = TSK_BINARY_GET_2BYTES(memory_ptr)&0x3fff; // All except 2 first bits
+ udvm->executionPointer+=2;
+ }
+ break;
+
+ case 0xc0: // 11000000 nnnnnnnn nnnnnnnn N 0 - 65535
+ {
+ result = TSK_BINARY_GET_2BYTES((memory_ptr+1));
+ udvm->executionPointer+=3;
+ }
+ break;
+
+ default:
+ {
+ TSK_DEBUG_ERROR("Invalide opcode: %u", *memory_ptr);
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_OPERAND);
+ }
+ break;
+ }
+ return result;
+}
+
+/**
+reference ($)<br>
+<table>
+<tr><td>Bytecode</td> <td>Operand value</td> <td>Range</td></tr>
+<tr><td>0nnnnnnn</td> <td>memory[2 * N]</td> <td>0 - 65535</td></tr>
+<tr><td>10nnnnnn nnnnnnnn </td> <td>memory[2 * N]</td> <td>0 - 65535</td></tr>
+<tr><td>11000000 nnnnnnnn nnnnnnnn</td> <td>memory[N]</td> <td>0 - 65535</td></tr>
+</table>
+*/
+uint16_t tcomp_udvm_opget_reference_param(tcomp_udvm_t *udvm)
+{
+ const uint8_t* memory_ptr = TCOMP_UDVM_GET_BUFFER_AT(udvm->executionPointer);
+ uint16_t result = 0;
+
+ switch( *memory_ptr & 0xc0) // 2 first bits
+ {
+ case 0x00: // 0nnnnnnn memory[2 * N] 0 - 65535
+ case 0x40: // 0nnnnnnn memory[2 * N] 0 - 65535
+ {
+ uint8_t N = (*(memory_ptr) & 0x7f); // no effect first bit is already nil
+ result = 2*N;
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 0x80: // 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
+ {
+ uint16_t N = (TSK_BINARY_GET_2BYTES(memory_ptr) & 0x3fff);
+ result = 2*N;
+ udvm->executionPointer+=2;
+ }
+ break;
+
+ case 0xc0: // 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
+ {
+ uint16_t N = TSK_BINARY_GET_2BYTES(memory_ptr+1);
+ result = N;
+ udvm->executionPointer+=3;
+ }
+ break;
+
+ default:
+ {
+ TSK_DEBUG_ERROR("Invalide opcode: %u", *memory_ptr);
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_OPERAND);
+ }
+ break;
+ }
+
+ return result;
+}
+
+/**
+multitype(%)<br>
+<table>
+<tr><td>Bytecode</td> <td>Operand value</td> <td>Range</td></tr>
+<tr><td>00nnnnnn</td> <td>N</td> <td>0 - 63</td></tr>
+<tr><td>01nnnnnn</td> <td>memory[2 * N]</td> <td>0 - 65535</td></tr>
+<tr><td>1000011n</td> <td>2 ^ (N + 6)</td> <td>64 , 128</td></tr>
+<tr><td>10001nnn</td> <td>2 ^ (N + 8)</td> <td>256 , ... , 32768</td></tr>
+<tr><td>111nnnnn</td> <td>N + 65504</td> <td>65504 - 65535</td></tr>
+<tr><td>1001nnnn nnnnnnnn</td> <td>N + 61440</td> <td>61440 - 65535</td></tr>
+<tr><td>101nnnnn nnnnnnnn</td> <td>N</td> <td>0 - 8191</td></tr>
+<tr><td>110nnnnn nnnnnnnn</td> <td>memory[N]</td> <td>0 - 65535</td></tr>
+<tr><td>10000000 nnnnnnnn nnnnnnnn</td> <td>N</td> <td>0 - 65535</td></tr>
+<tr><td>10000001 nnnnnnnn nnnnnnnn</td> <td>memory[N]</td> <td>0 - 65535</td></tr>
+</table>
+*/
+uint16_t tcomp_udvm_opget_multitype_param(tcomp_udvm_t *udvm)
+{
+ const uint8_t* memory_ptr = TCOMP_UDVM_GET_BUFFER_AT(udvm->executionPointer);
+ int8_t index = operand_multitype_indexes[*memory_ptr];
+ uint16_t result = 0;
+
+ switch(index)
+ {
+ case 1: // 00nnnnnn N 0 - 63
+ {
+ result = *(memory_ptr);
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 2: // 01nnnnnn memory[2 * N] 0 - 65535
+ {
+ uint8_t N = (*(memory_ptr) & 0x3f);
+ result = TSK_BINARY_GET_2BYTES( TCOMP_UDVM_GET_BUFFER_AT(2*N) );
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 3: // 1000011n 2 ^ (N + 6) 64 , 128
+ {
+ uint8_t N = (*(memory_ptr) & 0x01);
+ result = (uint16_t)pow( (double)2, (N + 6) );
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 4: // 10001nnn 2 ^ (N + 8) 256 , ... , 32768
+ {
+ uint8_t N = (*(memory_ptr) & 0x07);
+ result = (uint16_t)pow( (double)2, (N + 8) );
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 5: // 111nnnnn N + 65504 65504 - 65535
+ {
+ result = ((*(memory_ptr) & 0x1f) + 65504 );
+ udvm->executionPointer++;
+ }
+ break;
+
+ case 6: // 1001nnnn nnnnnnnn N + 61440 61440 - 65535
+ {
+ result = (TSK_BINARY_GET_2BYTES(memory_ptr) & 0x0fff) + 61440;
+ udvm->executionPointer+=2;
+ }
+ break;
+
+ case 7: // 101nnnnn nnnnnnnn N 0 - 8191
+ {
+ result = (TSK_BINARY_GET_2BYTES(memory_ptr) & 0x1fff);
+ udvm->executionPointer+=2;
+ }
+ break;
+
+ case 8: // 110nnnnn nnnnnnnn memory[N] 0 - 65535
+ {
+ uint16_t N = TSK_BINARY_GET_2BYTES(memory_ptr) & 0x1fff;
+ result = TSK_BINARY_GET_2BYTES( TCOMP_UDVM_GET_BUFFER_AT(N) );
+ udvm->executionPointer+=2;
+ }
+ break;
+
+ case 9: // 10000000 nnnnnnnn nnnnnnnn N 0 - 65535
+ {
+ result = TSK_BINARY_GET_2BYTES(memory_ptr+1);
+ udvm->executionPointer+=3;
+ }
+ break;
+
+ case 10: // 10000001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
+ {
+ uint16_t N = TSK_BINARY_GET_2BYTES(memory_ptr+1);
+ result = TSK_BINARY_GET_2BYTES( TCOMP_UDVM_GET_BUFFER_AT(N) );
+ udvm->executionPointer+=3;
+ }
+ break;
+
+ default: // -1
+ {
+ TSK_DEBUG_ERROR("Invalide opcode: %u", *memory_ptr);
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_OPERAND);
+ }
+ break;
+ }
+
+ return result;
+}
+
+/**
+address(@)
+This operand is decoded as a multitype operand followed by a further step: the memory address
+of the UDVM instruction containing the address operand is added to
+obtain the correct operand value. So if the operand value from
+Figure 10 is D then the actual operand value of an address is
+calculated as follows:
+
+ operand_value = (memory_address_of_instruction + D) modulo 2^16
+*/
+uint16_t tcomp_udvm_opget_address_param(tcomp_udvm_t *udvm, uint16_t memory_address_of_instruction)
+{
+ uint16_t D = tcomp_udvm_opget_multitype_param(udvm);
+ // (2^16) => 65536;
+ return ( (memory_address_of_instruction + D)%65536 );
+}
diff --git a/tinySIGCOMP/src/tcomp_udvm.statemanagment.c b/tinySIGCOMP/src/tcomp_udvm.statemanagment.c
new file mode 100644
index 0000000..80a0a45
--- /dev/null
+++ b/tinySIGCOMP/src/tcomp_udvm.statemanagment.c
@@ -0,0 +1,132 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tcomp_udvm.statemanagment.c
+ * @brief SigComp UDVM machine (State managment)
+ *
+ * @author Mamadou Diop <diopmamadou(at)yahoo.fr>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tcomp_udvm.h"
+
+
+int tcomp_udvm_byteCopy_TempStates(tcomp_udvm_t *udvm)
+{
+ int ok = 1;
+ uint8_t i;
+ uint8_t tocreate_size = tcomp_result_getTempStatesToCreateSize(udvm->lpResult);
+ uint8_t tofree_size = tcomp_result_getTempStatesToFreeSize(udvm->lpResult);
+
+
+ /*
+ * State Create
+ */
+ for(i = 0; i < tocreate_size; i++)
+ {
+ /*
+ * The UDVM byte copies a string of state_length bytes from the UDVM
+ * memory beginning at state_address (obeying the rules of Section 8.4).
+ * This is the state_value.
+ */
+ tcomp_state_t* lpState = udvm->lpResult->statesToCreate[i];
+ tcomp_buffer_allocBuff(lpState->value, lpState->length);
+ ok &= tcomp_udvm_bytecopy_from(udvm, tcomp_buffer_getBuffer(lpState->value), lpState->address, lpState->length);
+ }
+
+ /*
+ * State Free
+ */
+ for(i = 0; i<tofree_size; i++)
+ {
+ tcomp_tempstate_to_free_t *lpDesc = udvm->lpResult->statesToFree[i];
+ tcomp_buffer_allocBuff(lpDesc->identifier, lpDesc->partial_identifier_length);
+ ok &= tcomp_udvm_bytecopy_from(udvm, tcomp_buffer_getBuffer(lpDesc->identifier), lpDesc->partial_identifier_start, lpDesc->partial_identifier_length);
+ }
+ return ok;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+/// @brief Creates temporary state.
+///
+/// @param [in,out] udvm If non-null, the udvm.
+/// @param state_length Length of the state.
+/// @param state_address The state address.
+/// @param state_instruction The state instruction.
+/// @param minimum_access_length Length of the minimum access.
+/// @param state_retention_priority The state retention priority.
+/// @param end_msg Message describing the end.
+///
+/// @return 1 if succeed an zero otherwise.
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+int tcomp_udvm_createTempState(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction,
+ uint16_t minimum_access_length, uint16_t state_retention_priority, int end_msg)
+{
+ /*
+ * If the specified minimum_access_length does not lie between 6 and 20 inclusive, or if
+ * the state_retention_priority is 65535 then the END-MESSAGE
+ * instruction fails to make a state creation request of its own
+ * (however decompression failure does not occur and the state creation
+ * requests made by the STATE-CREATE instruction are still valid).
+ */
+ int is_ok = ( (6<=minimum_access_length && minimum_access_length<=20) && state_retention_priority!=65535 );
+
+ // if not ok and not END_MESSAGE --> decompression failure MUST occurs
+ if(!is_ok)
+ {
+ if(end_msg) return 1;
+
+ if(state_retention_priority == 65535)
+ {
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_STATE_PRIORITY);
+ }
+ else
+ {
+ tcomp_udvm_createNackInfo2(udvm, NACK_INVALID_STATE_ID_LENGTH);
+ }
+ return 0;
+ }
+
+ /*
+ * decompression failure occurs if the END-MESSAGE instruction makes a state creation request and four
+ * instances of the STATE-CREATE instruction have already been encountered.
+ */
+ if(tcomp_result_getTempStatesToCreateSize(udvm->lpResult) >= MAX_TEMP_SATES)
+ {
+ tcomp_udvm_createNackInfo2(udvm, NACK_TOO_MANY_STATE_REQUESTS);
+ return 0;
+ }
+
+ /*
+ * Is there a state to create?
+ */
+ if(is_ok)
+ {
+ // no byte copy ()
+ tcomp_state_t *lpState = tcomp_state_create(state_length, state_address, state_instruction, minimum_access_length, state_retention_priority);
+ tcomp_result_addTempStateToCreate(udvm->lpResult, lpState);
+ }
+
+ return 1;
+}
diff --git a/tinySIGCOMP/src/tinysigcomp_config.h b/tinySIGCOMP/src/tinysigcomp_config.h
new file mode 100644
index 0000000..a64a87e
--- /dev/null
+++ b/tinySIGCOMP/src/tinysigcomp_config.h
@@ -0,0 +1,90 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+#ifndef TINYSIGCOMP_CONFIG_H
+#define TINYSIGCOMP_CONFIG_H
+
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#ifdef __SYMBIAN32__
+#undef _WIN32 /* Because of WINSCW */
+#endif
+
+/* Windows (XP/Vista/7/CE and Windows Mobile) macro definition.
+*/
+#if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
+# define TCOMP_UNDER_WINDOWS 1
+#endif
+
+#if !defined(__GNUC__) && defined(TINYSIGCOMP_EXPORTS)
+# define TINYSIGCOMP_API __declspec(dllexport)
+# define TINYSIGCOMP_GEXTERN __declspec(dllexport)
+#elif !defined(__GNUC__) /*&& defined(TINYSIGCOMP_IMPORTS)*/
+# define TINYSIGCOMP_API __declspec(dllimport)
+# define TINYSIGCOMP_GEXTERN __declspec(dllimport)
+#else
+# define TINYSIGCOMP_API
+# define TINYSIGCOMP_GEXTERN extern
+#endif
+
+/* Guards against C++ name mangling
+*/
+#ifdef __cplusplus
+# define TCOMP_BEGIN_DECLS extern "C" {
+# define TCOMP_END_DECLS }
+#else
+# define TCOMP_BEGIN_DECLS
+# define TCOMP_END_DECLS
+#endif
+
+/* DEFLATE block type 01 (data compressed with fixed Huffman codes)
+*/
+#ifndef FORCE_STATIC
+# define FORCE_STATIC /*zlib*/
+#endif
+
+// avoid linking in the crc code
+#define NO_GZIP
+
+//
+// Nack - RFC 4077
+//
+#define NACK_VERSION 0x01
+#define NACK_MAX_HISTORY_SIZE 0x0A
+
+//
+// Feedbacks
+//
+#define USE_ONLY_ACKED_STATES 1
+
+/* Disable some well-known warnings
+*/
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include <stdint.h>
+
+#endif // TINYSIGCOMP_CONFIG_H
+
diff --git a/tinySIGCOMP/src/trees.c b/tinySIGCOMP/src/trees.c
new file mode 100644
index 0000000..fe8eda7
--- /dev/null
+++ b/tinySIGCOMP/src/trees.c
@@ -0,0 +1,1222 @@
+#if !HAS_ZLIB
+/* trees.c -- output deflated data using Huffman coding
+ * Copyright (C) 1995-2005 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * ALGORITHM
+ *
+ * The "deflation" process uses several Huffman trees. The more
+ * common source values are represented by shorter bit sequences.
+ *
+ * Each code tree is stored in a compressed form which is itself
+ * a Huffman encoding of the lengths of all the code strings (in
+ * ascending order by source values). The actual code strings are
+ * reconstructed from the lengths in the inflate process, as described
+ * in the deflate specification.
+ *
+ * REFERENCES
+ *
+ * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
+ * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
+ *
+ * Storer, James A.
+ * Data Compression: Methods and Theory, pp. 49-50.
+ * Computer Science Press, 1988. ISBN 0-7167-8156-5.
+ *
+ * Sedgewick, R.
+ * Algorithms, p290.
+ * Addison-Wesley, 1983. ISBN 0-201-06672-6.
+ */
+
+/* @(#) $Id$ */
+
+/* #define GEN_TREES_H */
+
+#include "deflate.h"
+
+#ifdef DEBUG
+# include <ctype.h>
+#endif
+
+/* ===========================================================================
+ * Constants
+ */
+
+#define MAX_BL_BITS 7
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+#define END_BLOCK 256
+/* end of block literal code */
+
+#define REP_3_6 16
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+#define REPZ_3_10 17
+/* repeat a zero length 3-10 times (3 bits of repeat count) */
+
+#define REPZ_11_138 18
+/* repeat a zero length 11-138 times (7 bits of repeat count) */
+
+local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
+ = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
+
+local const int extra_dbits[D_CODES] /* extra bits for each distance code */
+ = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
+
+local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
+ = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
+
+local const uch bl_order[BL_CODES]
+ = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+#define Buf_size (8 * 2*sizeof(char))
+/* Number of bits used within bi_buf. (bi_buf might be implemented on
+ * more than 16 bits on some systems.)
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+#define DIST_CODE_LEN 512 /* see definition of array dist_code below */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+/* non ANSI compilers may not accept trees.h */
+
+local ct_data static_ltree[L_CODES+2];
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+local ct_data static_dtree[D_CODES];
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+uch _dist_code[DIST_CODE_LEN];
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+uch _length_code[MAX_MATCH-MIN_MATCH+1];
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+local int base_length[LENGTH_CODES];
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+local int base_dist[D_CODES];
+/* First normalized distance for each code (0 = distance of 1) */
+
+#else
+# include "trees.h"
+#endif /* GEN_TREES_H */
+
+struct static_tree_desc_s {
+ const ct_data *static_tree; /* static tree or NULL */
+ const intf *extra_bits; /* extra bits for each code or NULL */
+ int extra_base; /* base index for extra_bits */
+ int elems; /* max number of elements in the tree */
+ int max_length; /* max bit length for the codes */
+};
+
+local static_tree_desc static_l_desc =
+{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
+
+local static_tree_desc static_d_desc =
+{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
+
+local static_tree_desc static_bl_desc =
+{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
+
+/* ===========================================================================
+ * Local (static) routines in this file.
+ */
+
+local void tr_static_init OF((void));
+local void init_block OF((deflate_state *s));
+local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
+local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
+local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
+local void build_tree OF((deflate_state *s, tree_desc *desc));
+local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local int build_bl_tree OF((deflate_state *s));
+local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
+ int blcodes));
+local void compress_block OF((deflate_state *s, ct_data *ltree,
+ ct_data *dtree));
+local void set_data_type OF((deflate_state *s));
+local unsigned bi_reverse OF((unsigned value, int length));
+local void bi_windup OF((deflate_state *s));
+local void bi_flush OF((deflate_state *s));
+local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
+ int header));
+
+#ifdef GEN_TREES_H
+local void gen_trees_header OF((void));
+#endif
+
+#ifndef DEBUG
+# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
+ /* Send a code of the given tree. c and tree must not have side effects */
+
+#else /* DEBUG */
+# define send_code(s, c, tree) \
+ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
+ send_bits(s, tree[c].Code, tree[c].Len); }
+#endif
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+#define put_short(s, w) { \
+ put_byte(s, (uch)((w) & 0xff)); \
+ put_byte(s, (uch)((ush)(w) >> 8)); \
+}
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+#ifdef DEBUG
+local void send_bits OF((deflate_state *s, int value, int length));
+
+local void send_bits(s, value, length)
+ deflate_state *s;
+ int value; /* value to send */
+ int length; /* number of bits */
+{
+ Tracevv((stderr," l %2d v %4x ", length, value));
+ Assert(length > 0 && length <= 15, "invalid length");
+ s->bits_sent += (ulg)length;
+
+ /* If not enough room in bi_buf, use (valid) bits from bi_buf and
+ * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
+ * unused bits in value.
+ */
+ if (s->bi_valid > (int)Buf_size - length) {
+ s->bi_buf |= (value << s->bi_valid);
+ put_short(s, s->bi_buf);
+ s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
+ s->bi_valid += length - Buf_size;
+ } else {
+ s->bi_buf |= value << s->bi_valid;
+ s->bi_valid += length;
+ }
+}
+#else /* !DEBUG */
+
+#define send_bits(s, value, length) \
+{ int len = length;\
+ if (s->bi_valid > (int)Buf_size - len) {\
+ int val = value;\
+ s->bi_buf |= (val << s->bi_valid);\
+ put_short(s, s->bi_buf);\
+ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
+ s->bi_valid += len - Buf_size;\
+ } else {\
+ s->bi_buf |= (value) << s->bi_valid;\
+ s->bi_valid += len;\
+ }\
+}
+#endif /* DEBUG */
+
+
+/* the arguments must not have side effects */
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+local void tr_static_init()
+{
+#if defined(GEN_TREES_H) || !defined(STDC)
+ static int static_init_done = 0;
+ int n; /* iterates over tree elements */
+ int bits; /* bit counter */
+ int length; /* length value */
+ int code; /* code value */
+ int dist; /* distance index */
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ if (static_init_done) return;
+
+ /* For some embedded targets, global variables are not initialized: */
+ static_l_desc.static_tree = static_ltree;
+ static_l_desc.extra_bits = extra_lbits;
+ static_d_desc.static_tree = static_dtree;
+ static_d_desc.extra_bits = extra_dbits;
+ static_bl_desc.extra_bits = extra_blbits;
+
+ /* Initialize the mapping length (0..255) -> length code (0..28) */
+ length = 0;
+ for (code = 0; code < LENGTH_CODES-1; code++) {
+ base_length[code] = length;
+ for (n = 0; n < (1<<extra_lbits[code]); n++) {
+ _length_code[length++] = (uch)code;
+ }
+ }
+ Assert (length == 256, "tr_static_init: length != 256");
+ /* Note that the length 255 (match length 258) can be represented
+ * in two different ways: code 284 + 5 bits or code 285, so we
+ * overwrite length_code[255] to use the best encoding:
+ */
+ _length_code[length-1] = (uch)code;
+
+ /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+ dist = 0;
+ for (code = 0 ; code < 16; code++) {
+ base_dist[code] = dist;
+ for (n = 0; n < (1<<extra_dbits[code]); n++) {
+ _dist_code[dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: dist != 256");
+ dist >>= 7; /* from now on, all distances are divided by 128 */
+ for ( ; code < D_CODES; code++) {
+ base_dist[code] = dist << 7;
+ for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
+ _dist_code[256 + dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+ /* Construct the codes of the static literal tree */
+ for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
+ n = 0;
+ while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
+ while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
+ while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
+ while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
+ /* Codes 286 and 287 do not exist, but we must include them in the
+ * tree construction to get a canonical Huffman tree (longest code
+ * all ones)
+ */
+ gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
+
+ /* The static distance tree is trivial: */
+ for (n = 0; n < D_CODES; n++) {
+ static_dtree[n].Len = 5;
+ static_dtree[n].Code = bi_reverse((unsigned)n, 5);
+ }
+ static_init_done = 1;
+
+# ifdef GEN_TREES_H
+ gen_trees_header();
+# endif
+#endif /* defined(GEN_TREES_H) || !defined(STDC) */
+}
+
+/* ===========================================================================
+ * Genererate the file trees.h describing the static trees.
+ */
+#ifdef GEN_TREES_H
+# ifndef DEBUG
+# include <stdio.h>
+# endif
+
+# define SEPARATOR(i, last, width) \
+ ((i) == (last)? "\n};\n\n" : \
+ ((i) % (width) == (width)-1 ? ",\n" : ", "))
+
+void gen_trees_header()
+{
+ FILE *header = fopen("trees.h", "w");
+ int i;
+
+ Assert (header != NULL, "Can't open trees.h");
+ fprintf(header,
+ "/* header created automatically with -DGEN_TREES_H */\n\n");
+
+ fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
+ for (i = 0; i < L_CODES+2; i++) {
+ fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
+ static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
+ }
+
+ fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
+ for (i = 0; i < D_CODES; i++) {
+ fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
+ static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
+ }
+
+ fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
+ for (i = 0; i < DIST_CODE_LEN; i++) {
+ fprintf(header, "%2u%s", _dist_code[i],
+ SEPARATOR(i, DIST_CODE_LEN-1, 20));
+ }
+
+ fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
+ for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
+ fprintf(header, "%2u%s", _length_code[i],
+ SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
+ }
+
+ fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
+ for (i = 0; i < LENGTH_CODES; i++) {
+ fprintf(header, "%1u%s", base_length[i],
+ SEPARATOR(i, LENGTH_CODES-1, 20));
+ }
+
+ fprintf(header, "local const int base_dist[D_CODES] = {\n");
+ for (i = 0; i < D_CODES; i++) {
+ fprintf(header, "%5u%s", base_dist[i],
+ SEPARATOR(i, D_CODES-1, 10));
+ }
+
+ fclose(header);
+}
+#endif /* GEN_TREES_H */
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+void _tr_init(s)
+ deflate_state *s;
+{
+ tr_static_init();
+
+ s->l_desc.dyn_tree = s->dyn_ltree;
+ s->l_desc.stat_desc = &static_l_desc;
+
+ s->d_desc.dyn_tree = s->dyn_dtree;
+ s->d_desc.stat_desc = &static_d_desc;
+
+ s->bl_desc.dyn_tree = s->bl_tree;
+ s->bl_desc.stat_desc = &static_bl_desc;
+
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+#ifdef DEBUG
+ s->compressed_len = 0L;
+ s->bits_sent = 0L;
+#endif
+
+ /* Initialize the first block of the first file: */
+ init_block(s);
+}
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+local void init_block(s)
+ deflate_state *s;
+{
+ int n; /* iterates over tree elements */
+
+ /* Initialize the trees. */
+ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
+ for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
+ for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
+
+ s->dyn_ltree[END_BLOCK].Freq = 1;
+ s->opt_len = s->static_len = 0L;
+ s->last_lit = s->matches = 0;
+}
+
+#define SMALLEST 1
+/* Index within the heap array of least frequent node in the Huffman tree */
+
+
+/* ===========================================================================
+ * Remove the smallest element from the heap and recreate the heap with
+ * one less element. Updates heap and heap_len.
+ */
+#define pqremove(s, tree, top) \
+{\
+ top = s->heap[SMALLEST]; \
+ s->heap[SMALLEST] = s->heap[s->heap_len--]; \
+ pqdownheap(s, tree, SMALLEST); \
+}
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+#define smaller(tree, n, m, depth) \
+ (tree[n].Freq < tree[m].Freq || \
+ (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+local void pqdownheap(s, tree, k)
+ deflate_state *s;
+ ct_data *tree; /* the tree to restore */
+ int k; /* node to move down */
+{
+ int v = s->heap[k];
+ int j = k << 1; /* left son of k */
+ while (j <= s->heap_len) {
+ /* Set j to the smallest of the two sons: */
+ if (j < s->heap_len &&
+ smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
+ j++;
+ }
+ /* Exit if v is smaller than both sons */
+ if (smaller(tree, v, s->heap[j], s->depth)) break;
+
+ /* Exchange v with the smallest son */
+ s->heap[k] = s->heap[j]; k = j;
+
+ /* And continue down the tree, setting j to the left son of k */
+ j <<= 1;
+ }
+ s->heap[k] = v;
+}
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ * above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ * array bl_count contains the frequencies for each bit length.
+ * The length opt_len is updated; static_len is also updated if stree is
+ * not null.
+ */
+local void gen_bitlen(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ int max_code = desc->max_code;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ const intf *extra = desc->stat_desc->extra_bits;
+ int base = desc->stat_desc->extra_base;
+ int max_length = desc->stat_desc->max_length;
+ int h; /* heap index */
+ int n, m; /* iterate over the tree elements */
+ int bits; /* bit length */
+ int xbits; /* extra bits */
+ ush f; /* frequency */
+ int overflow = 0; /* number of elements with bit length too large */
+
+ for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
+
+ /* In a first pass, compute the optimal bit lengths (which may
+ * overflow in the case of the bit length tree).
+ */
+ tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
+
+ for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
+ n = s->heap[h];
+ bits = tree[tree[n].Dad].Len + 1;
+ if (bits > max_length) bits = max_length, overflow++;
+ tree[n].Len = (ush)bits;
+ /* We overwrite tree[n].Dad which is no longer needed */
+
+ if (n > max_code) continue; /* not a leaf node */
+
+ s->bl_count[bits]++;
+ xbits = 0;
+ if (n >= base) xbits = extra[n-base];
+ f = tree[n].Freq;
+ s->opt_len += (ulg)f * (bits + xbits);
+ if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
+ }
+ if (overflow == 0) return;
+
+ Trace((stderr,"\nbit length overflow\n"));
+ /* This happens for example on obj2 and pic of the Calgary corpus */
+
+ /* Find the first bit length which could increase: */
+ do {
+ bits = max_length-1;
+ while (s->bl_count[bits] == 0) bits--;
+ s->bl_count[bits]--; /* move one leaf down the tree */
+ s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
+ s->bl_count[max_length]--;
+ /* The brother of the overflow item also moves one step up,
+ * but this does not affect bl_count[max_length]
+ */
+ overflow -= 2;
+ } while (overflow > 0);
+
+ /* Now recompute all bit lengths, scanning in increasing frequency.
+ * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+ * lengths instead of fixing only the wrong ones. This idea is taken
+ * from 'ar' written by Haruhiko Okumura.)
+ */
+ for (bits = max_length; bits != 0; bits--) {
+ n = s->bl_count[bits];
+ while (n != 0) {
+ m = s->heap[--h];
+ if (m > max_code) continue;
+ if ((unsigned) tree[m].Len != (unsigned) bits) {
+ Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+ s->opt_len += ((long)bits - (long)tree[m].Len)
+ *(long)tree[m].Freq;
+ tree[m].Len = (ush)bits;
+ }
+ n--;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ * zero code length.
+ */
+local void gen_codes (tree, max_code, bl_count)
+ ct_data *tree; /* the tree to decorate */
+ int max_code; /* largest code with non zero frequency */
+ ushf *bl_count; /* number of codes at each bit length */
+{
+ ush next_code[MAX_BITS+1]; /* next code value for each bit length */
+ ush code = 0; /* running code value */
+ int bits; /* bit index */
+ int n; /* code index */
+
+ /* The distribution counts are first used to generate the code values
+ * without bit reversal.
+ */
+ for (bits = 1; bits <= MAX_BITS; bits++) {
+ next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+ }
+ /* Check that the bit counts in bl_count are consistent. The last code
+ * must be all ones.
+ */
+ Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+ "inconsistent bit counts");
+ Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+ for (n = 0; n <= max_code; n++) {
+ int len = tree[n].Len;
+ if (len == 0) continue;
+ /* Now reverse the bits */
+ tree[n].Code = bi_reverse(next_code[len]++, len);
+
+ Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+ n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+ }
+}
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ * and corresponding code. The length opt_len is updated; static_len is
+ * also updated if stree is not null. The field max_code is set.
+ */
+local void build_tree(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ int elems = desc->stat_desc->elems;
+ int n, m; /* iterate over heap elements */
+ int max_code = -1; /* largest code with non zero frequency */
+ int node; /* new node being created */
+
+ /* Construct the initial heap, with least frequent element in
+ * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+ * heap[0] is not used.
+ */
+ s->heap_len = 0, s->heap_max = HEAP_SIZE;
+
+ for (n = 0; n < elems; n++) {
+ if (tree[n].Freq != 0) {
+ s->heap[++(s->heap_len)] = max_code = n;
+ s->depth[n] = 0;
+ } else {
+ tree[n].Len = 0;
+ }
+ }
+
+ /* The pkzip format requires that at least one distance code exists,
+ * and that at least one bit should be sent even if there is only one
+ * possible code. So to avoid special checks later on we force at least
+ * two codes of non zero frequency.
+ */
+ while (s->heap_len < 2) {
+ node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
+ tree[node].Freq = 1;
+ s->depth[node] = 0;
+ s->opt_len--; if (stree) s->static_len -= stree[node].Len;
+ /* node is 0 or 1 so it does not have extra bits */
+ }
+ desc->max_code = max_code;
+
+ /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+ * establish sub-heaps of increasing lengths:
+ */
+ for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
+
+ /* Construct the Huffman tree by repeatedly combining the least two
+ * frequent nodes.
+ */
+ node = elems; /* next internal node of the tree */
+ do {
+ pqremove(s, tree, n); /* n = node of least frequency */
+ m = s->heap[SMALLEST]; /* m = node of next least frequency */
+
+ s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
+ s->heap[--(s->heap_max)] = m;
+
+ /* Create a new node father of n and m */
+ tree[node].Freq = tree[n].Freq + tree[m].Freq;
+ s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
+ s->depth[n] : s->depth[m]) + 1);
+ tree[n].Dad = tree[m].Dad = (ush)node;
+#ifdef DUMP_BL_TREE
+ if (tree == s->bl_tree) {
+ fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
+ node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
+ }
+#endif
+ /* and insert the new node in the heap */
+ s->heap[SMALLEST] = node++;
+ pqdownheap(s, tree, SMALLEST);
+
+ } while (s->heap_len >= 2);
+
+ s->heap[--(s->heap_max)] = s->heap[SMALLEST];
+
+ /* At this point, the fields freq and dad are set. We can now
+ * generate the bit lengths.
+ */
+ gen_bitlen(s, (tree_desc *)desc);
+
+ /* The field len is now set, we can generate the bit codes */
+ gen_codes ((ct_data *)tree, max_code, s->bl_count);
+}
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+local void scan_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ if (nextlen == 0) max_count = 138, min_count = 3;
+ tree[max_code+1].Len = (ush)0xffff; /* guard */
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ s->bl_tree[curlen].Freq += count;
+ } else if (curlen != 0) {
+ if (curlen != prevlen) s->bl_tree[curlen].Freq++;
+ s->bl_tree[REP_3_6].Freq++;
+ } else if (count <= 10) {
+ s->bl_tree[REPZ_3_10].Freq++;
+ } else {
+ s->bl_tree[REPZ_11_138].Freq++;
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+local void send_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ /* tree[max_code+1].Len = -1; */ /* guard already set */
+ if (nextlen == 0) max_count = 138, min_count = 3;
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
+
+ } else if (curlen != 0) {
+ if (curlen != prevlen) {
+ send_code(s, curlen, s->bl_tree); count--;
+ }
+ Assert(count >= 3 && count <= 6, " 3_6?");
+ send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
+
+ } else if (count <= 10) {
+ send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
+
+ } else {
+ send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+local int build_bl_tree(s)
+ deflate_state *s;
+{
+ int max_blindex; /* index of last bit length code of non zero freq */
+
+ /* Determine the bit length frequencies for literal and distance trees */
+ scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
+ scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
+
+ /* Build the bit length tree: */
+ build_tree(s, (tree_desc *)(&(s->bl_desc)));
+ /* opt_len now includes the length of the tree representations, except
+ * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+ */
+
+ /* Determine the number of bit length codes to send. The pkzip format
+ * requires that at least 4 bit length codes be sent. (appnote.txt says
+ * 3 but the actual value used is 4.)
+ */
+ for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
+ if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
+ }
+ /* Update opt_len to include the bit length tree and counts */
+ s->opt_len += 3*(max_blindex+1) + 5+5+4;
+ Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+ s->opt_len, s->static_len));
+
+ return max_blindex;
+}
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+local void send_all_trees(s, lcodes, dcodes, blcodes)
+ deflate_state *s;
+ int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+ int rank; /* index in bl_order */
+
+ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+ Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+ "too many codes");
+ Tracev((stderr, "\nbl counts: "));
+ send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
+ send_bits(s, dcodes-1, 5);
+ send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
+ for (rank = 0; rank < blcodes; rank++) {
+ Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+ send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
+ }
+ Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
+ Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
+ Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+/* ===========================================================================
+ * Send a stored block
+ */
+void _tr_stored_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
+#ifdef DEBUG
+ s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
+ s->compressed_len += (stored_len + 4) << 3;
+#endif
+ copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
+}
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ * The current inflate code requires 9 bits of lookahead. If the
+ * last two codes for the previous block (real code plus EOB) were coded
+ * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
+ * the last real code. In this case we send two empty static blocks instead
+ * of one. (There are no problems if the previous block is stored or fixed.)
+ * To simplify the code, we assume the worst case of last real code encoded
+ * on one bit only.
+ */
+void _tr_align(s)
+ deflate_state *s;
+{
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
+#endif
+ bi_flush(s);
+ /* Of the 10 bits for the empty block, we have already sent
+ * (10 - bi_valid) bits. The lookahead for the last real code (before
+ * the EOB of the previous block) was thus at least one plus the length
+ * of the EOB plus what we have just sent of the empty static block.
+ */
+ if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L;
+#endif
+ bi_flush(s);
+ }
+ s->last_eob_len = 7;
+}
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and output the encoded block to the zip file.
+ */
+void _tr_flush_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block, or NULL if too old */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
+ int max_blindex = 0; /* index of last bit length code of non zero freq */
+
+ /* Build the Huffman trees unless a stored block is forced */
+ if (s->level > 0) {
+
+ /* Check if the file is binary or text */
+ if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
+ set_data_type(s);
+
+ /* Construct the literal and distance trees */
+ build_tree(s, (tree_desc *)(&(s->l_desc)));
+ Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+
+ build_tree(s, (tree_desc *)(&(s->d_desc)));
+ Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+ /* At this point, opt_len and static_len are the total bit lengths of
+ * the compressed block data, excluding the tree representations.
+ */
+
+ /* Build the bit length tree for the above two trees, and get the index
+ * in bl_order of the last bit length code to send.
+ */
+ max_blindex = build_bl_tree(s);
+
+ /* Determine the best encoding. Compute the block lengths in bytes. */
+ opt_lenb = (s->opt_len+3+7)>>3;
+ static_lenb = (s->static_len+3+7)>>3;
+
+ Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+ opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+ s->last_lit));
+
+ if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
+
+ } else {
+ Assert(buf != (char*)0, "lost buf");
+ opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+ }
+
+#ifdef FORCE_STORED
+ if (buf != (char*)0) { /* force stored block */
+#else
+ if (stored_len+4 <= opt_lenb && buf != (char*)0) {
+ /* 4: two words for the lengths */
+#endif
+ /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+ * Otherwise we can't have processed more than WSIZE input bytes since
+ * the last block flush, because compression would have been
+ * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+ * transform a block into a stored block.
+ */
+ _tr_stored_block(s, buf, stored_len, eof);
+
+#ifdef FORCE_STATIC
+ } else if (static_lenb >= 0) { /* force static trees */
+#else
+ } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
+#endif
+ send_bits(s, (STATIC_TREES<<1)+eof, 3);
+ compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->static_len;
+#endif
+ } else {
+ send_bits(s, (DYN_TREES<<1)+eof, 3);
+ send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
+ max_blindex+1);
+ compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->opt_len;
+#endif
+ }
+ Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+ /* The above check is made mod 2^32, for files larger than 512 MB
+ * and uLong implemented on 32 bits.
+ */
+ init_block(s);
+
+ if (eof) {
+ bi_windup(s);
+#ifdef DEBUG
+ s->compressed_len += 7; /* align on byte boundary */
+#endif
+ }
+ Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+ s->compressed_len-7*eof));
+}
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+int _tr_tally (s, dist, lc)
+ deflate_state *s;
+ unsigned dist; /* distance of matched string */
+ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+ s->d_buf[s->last_lit] = (ush)dist;
+ s->l_buf[s->last_lit++] = (uch)lc;
+ if (dist == 0) {
+ /* lc is the unmatched char */
+ s->dyn_ltree[lc].Freq++;
+ } else {
+ s->matches++;
+ /* Here, lc is the match length - MIN_MATCH */
+ dist--; /* dist = match distance - 1 */
+ Assert((ush)dist < (ush)MAX_DIST(s) &&
+ (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+ (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
+
+ s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
+ s->dyn_dtree[d_code(dist)].Freq++;
+ }
+
+#ifdef TRUNCATE_BLOCK
+ /* Try to guess if it is profitable to stop the current block here */
+ if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
+ /* Compute an upper bound for the compressed length */
+ ulg out_length = (ulg)s->last_lit*8L;
+ ulg in_length = (ulg)((long)s->strstart - s->block_start);
+ int dcode;
+ for (dcode = 0; dcode < D_CODES; dcode++) {
+ out_length += (ulg)s->dyn_dtree[dcode].Freq *
+ (5L+extra_dbits[dcode]);
+ }
+ out_length >>= 3;
+ Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+ s->last_lit, in_length, out_length,
+ 100L - out_length*100L/in_length));
+ if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
+ }
+#endif
+ return (s->last_lit == s->lit_bufsize-1);
+ /* We avoid equality with lit_bufsize because of wraparound at 64K
+ * on 16 bit machines and because stored blocks are restricted to
+ * 64K-1 bytes.
+ */
+}
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+local void compress_block(s, ltree, dtree)
+ deflate_state *s;
+ ct_data *ltree; /* literal tree */
+ ct_data *dtree; /* distance tree */
+{
+ unsigned dist; /* distance of matched string */
+ int lc; /* match length or unmatched char (if dist == 0) */
+ unsigned lx = 0; /* running index in l_buf */
+ unsigned code; /* the code to send */
+ int extra; /* number of extra bits to send */
+
+ if (s->last_lit != 0) do {
+ dist = s->d_buf[lx];
+ lc = s->l_buf[lx++];
+ if (dist == 0) {
+ send_code(s, lc, ltree); /* send a literal byte */
+ Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+ } else {
+ /* Here, lc is the match length - MIN_MATCH */
+ code = _length_code[lc];
+ send_code(s, code+LITERALS+1, ltree); /* send the length code */
+ extra = extra_lbits[code];
+ if (extra != 0) {
+ lc -= base_length[code];
+ send_bits(s, lc, extra); /* send the extra length bits */
+ }
+ dist--; /* dist is now the match distance - 1 */
+ code = d_code(dist);
+ Assert (code < D_CODES, "bad d_code");
+
+ send_code(s, code, dtree); /* send the distance code */
+ extra = extra_dbits[code];
+ if (extra != 0) {
+ dist -= base_dist[code];
+ send_bits(s, dist, extra); /* send the extra distance bits */
+ }
+ } /* literal or match pair ? */
+
+ /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+ Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+ "pendingBuf overflow");
+
+ } while (lx < s->last_lit);
+
+ send_code(s, END_BLOCK, ltree);
+ s->last_eob_len = ltree[END_BLOCK].Len;
+}
+
+/* ===========================================================================
+ * Set the data type to BINARY or TEXT, using a crude approximation:
+ * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
+ * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
+ * IN assertion: the fields Freq of dyn_ltree are set.
+ */
+local void set_data_type(s)
+ deflate_state *s;
+{
+ int n;
+
+ for (n = 0; n < 9; n++)
+ if (s->dyn_ltree[n].Freq != 0)
+ break;
+ if (n == 9)
+ for (n = 14; n < 32; n++)
+ if (s->dyn_ltree[n].Freq != 0)
+ break;
+ s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
+}
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+local unsigned bi_reverse(code, len)
+ unsigned code; /* the value to invert */
+ int len; /* its bit length */
+{
+ register unsigned res = 0;
+ do {
+ res |= code & 1;
+ code >>= 1, res <<= 1;
+ } while (--len > 0);
+ return res >> 1;
+}
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+local void bi_flush(s)
+ deflate_state *s;
+{
+ if (s->bi_valid == 16) {
+ put_short(s, s->bi_buf);
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ } else if (s->bi_valid >= 8) {
+ put_byte(s, (Byte)s->bi_buf);
+ s->bi_buf >>= 8;
+ s->bi_valid -= 8;
+ }
+}
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+local void bi_windup(s)
+ deflate_state *s;
+{
+ if (s->bi_valid > 8) {
+ put_short(s, s->bi_buf);
+ } else if (s->bi_valid > 0) {
+ put_byte(s, (Byte)s->bi_buf);
+ }
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+#ifdef DEBUG
+ s->bits_sent = (s->bits_sent+7) & ~7;
+#endif
+}
+
+/* ===========================================================================
+ * Copy a stored block, storing first the length and its
+ * one's complement if requested.
+ */
+local void copy_block(s, buf, len, header)
+ deflate_state *s;
+ charf *buf; /* the input data */
+ unsigned len; /* its length */
+ int header; /* true if block header must be written */
+{
+ bi_windup(s); /* align on byte boundary */
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+
+ if (header) {
+ put_short(s, (ush)len);
+ put_short(s, (ush)~len);
+#ifdef DEBUG
+ s->bits_sent += 2*16;
+#endif
+ }
+#ifdef DEBUG
+ s->bits_sent += (ulg)len<<3;
+#endif
+ while (len--) {
+ put_byte(s, *buf++);
+ }
+}
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/trees.h b/tinySIGCOMP/src/trees.h
new file mode 100644
index 0000000..f8ce546
--- /dev/null
+++ b/tinySIGCOMP/src/trees.h
@@ -0,0 +1,131 @@
+#if !HAS_ZLIB
+/* header created automatically with -DGEN_TREES_H */
+
+local const ct_data static_ltree[L_CODES+2] = {
+{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}},
+{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}},
+{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}},
+{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}},
+{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}},
+{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}},
+{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}},
+{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}},
+{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}},
+{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}},
+{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}},
+{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}},
+{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}},
+{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}},
+{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}},
+{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}},
+{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}},
+{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}},
+{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}},
+{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}},
+{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}},
+{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}},
+{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}},
+{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}},
+{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}},
+{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}},
+{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}},
+{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}},
+{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}},
+{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}},
+{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}},
+{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}},
+{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}},
+{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}},
+{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}},
+{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}},
+{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}},
+{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}},
+{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}},
+{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}},
+{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}},
+{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}},
+{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}},
+{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}},
+{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}},
+{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}},
+{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}},
+{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}},
+{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}},
+{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}},
+{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}},
+{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}},
+{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}},
+{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}},
+{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}},
+{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}},
+{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}},
+{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}}
+};
+
+local const ct_data static_dtree[D_CODES] = {
+{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
+{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
+{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
+{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
+{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
+{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
+};
+
+const uch _dist_code[DIST_CODE_LEN] = {
+ 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
+ 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
+10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17,
+18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
+};
+
+const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
+13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
+17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
+19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
+22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
+};
+
+local const int base_length[LENGTH_CODES] = {
+0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
+64, 80, 96, 112, 128, 160, 192, 224, 0
+};
+
+local const int base_dist[D_CODES] = {
+ 0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
+ 32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
+ 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
+};
+
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/zconf.h b/tinySIGCOMP/src/zconf.h
new file mode 100644
index 0000000..789f0ed
--- /dev/null
+++ b/tinySIGCOMP/src/zconf.h
@@ -0,0 +1,337 @@
+#if !HAS_ZLIB
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+#include "tinysigcomp_config.h"
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ */
+#ifdef Z_PREFIX
+# define deflateInit_ z_deflateInit_
+# define deflate z_deflate
+# define deflateEnd z_deflateEnd
+# define inflateInit_ z_inflateInit_
+# define inflate z_inflate
+# define inflateEnd z_inflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateCopy z_deflateCopy
+# define deflateReset z_deflateReset
+# define deflateParams z_deflateParams
+# define deflateBound z_deflateBound
+# define deflatePrime z_deflatePrime
+# define inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateCopy z_inflateCopy
+# define inflateReset z_inflateReset
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+# define zError z_zError
+
+# define alloc_func z_alloc_func
+# define free_func z_free_func
+# define in_func z_in_func
+# define out_func z_out_func
+# define Byte z_Byte
+# define uInt z_uInt
+# define uLong z_uLong
+# define Bytef z_Bytef
+# define charf z_charf
+# define intf z_intf
+# define uIntf z_uIntf
+# define uLongf z_uLongf
+# define voidpf z_voidpf
+# define voidp z_voidp
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32) || defined(__SYMBIAN32__)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+# ifdef FAR
+# undef FAR
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/zlib.h b/tinySIGCOMP/src/zlib.h
new file mode 100644
index 0000000..33ed30f
--- /dev/null
+++ b/tinySIGCOMP/src/zlib.h
@@ -0,0 +1,1360 @@
+#if !HAS_ZLIB
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has
+ dropped to zero. It must update next_out and avail_out when avail_out
+ has dropped to zero. The application must initialize zalloc, zfree and
+ opaque before calling the init function. All other fields are set by the
+ compression library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this
+ if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
+ pointers returned by zalloc for objects of exactly 65536 bytes *must*
+ have their offset normalized to zero. The default allocation function
+ provided by this library ensures this (see zutil.c). To reduce memory
+ requirements and avoid any allocation of 64K objects, at the expense of
+ compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or
+ progress reports. After compression, total_in holds the total size of
+ the uncompressed data and may be saved for use in the decompressor
+ (particularly if the decompressor wants to decompress everything in
+ a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+ This check is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller.
+ If zalloc and zfree are set to Z_NULL, deflateInit updates them to
+ use default allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at
+ all (the input data is simply copied a block at a time).
+ Z_DEFAULT_COMPRESSION requests a default compromise between speed and
+ compression (currently equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION).
+ msg is set to null if there is no error message. deflateInit does not
+ perform any compression: this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+ output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications).
+ Some output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating avail_in or avail_out accordingly; avail_out
+ should never be zero before the call. The application can consume the
+ compressed output when it wants, for example when the output buffer is full
+ (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
+ and with zero avail_out, it must be called again after making room in the
+ output buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumualte before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In particular
+ avail_in is zero after the call if enough output space has been provided
+ before the call.) Flushing may degrade compression for some compression
+ algorithms and so it should be used only when necessary.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there
+ was enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the
+ stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least
+ the value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect
+ the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case,
+ msg may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
+ value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller. msg is set to null if there is no error
+ message. inflateInit does not perform any decompression apart from reading
+ the zlib header if present: this will be done by inflate(). (So next_in and
+ avail_in may be modified, but next_out and avail_out are unchanged.)
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing
+ will resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there
+ is no more input data or no more space in the output buffer (see below
+ about the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating the next_* and avail_* values accordingly.
+ The application can consume the uncompressed output when it wants, for
+ example when the output buffer is full (avail_out == 0), or after each
+ call of inflate(). If inflate returns Z_OK and with zero avail_out, it
+ must be called again after making room in the output buffer because there
+ might be more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
+ Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate() stop
+ if and when it gets to the next deflate block boundary. When decoding the
+ zlib or gzip format, this will cause inflate() to return immediately after
+ the header and before the first block. When doing a raw inflate, inflate()
+ will go ahead and process the first block, and will return when it gets to
+ the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64
+ if inflate() is currently decoding the last block in the deflate stream,
+ plus 128 if inflate() returned immediately after decoding an end-of-block
+ code or decoding the complete header up to just before the first byte of the
+ deflate stream. The end-of-block will not be indicated until all of the
+ uncompressed data from that block has been written to strm->next_out. The
+ number of unused bits may in general be greater than seven, except when
+ bit 7 of data_type is set, in which case the number of unused bits will be
+ less than eight.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step
+ (a single call of inflate), the parameter flush should be set to
+ Z_FINISH. In this case all pending input is processed and all pending
+ output is flushed; avail_out must be large enough to hold all the
+ uncompressed data. (The size of the uncompressed data may have been saved
+ by the compressor for this purpose.) The next operation on this stream must
+ be inflateEnd to deallocate the decompression state. The use of Z_FINISH
+ is never required, but can be used to inform inflate that a faster approach
+ may be used for the single inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() will decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically. Any information
+ contained in the gzip header is not retained, so applications that need that
+ information should instead use raw inflate, see inflateInit2() below, or
+ inflateBack() and perform their own processing of the gzip header and
+ trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may then
+ call inflateSync() to look for a good compression block if a partial recovery
+ of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by
+ the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero),
+ no header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but
+ is slow and reduces compression ratio; memLevel=9 uses maximum memory
+ for optimal speed. The default value is 8. See zconf.h for total memory
+ usage as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
+ Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
+ parameter only affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately. Z_FIXED prevents the
+ use of dynamic Huffman codes, allowing for a simpler decoder for special
+ applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
+ method). msg is set to null if there is no error message. deflateInit2 does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any
+ call of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size in
+ deflate or deflate2. Thus the strings most likely to be useful should be
+ put at the end of the dictionary, not at the front. In addition, the
+ current implementation of deflate will use at most the window size minus
+ 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and
+ can consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+ The stream will keep the same compression level and any other attributes
+ that may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different
+ strategy. If the compression level is changed, the input available so far
+ is compressed with the old level (and may be flushed); the new level will
+ take effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to
+ be compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
+ if strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit()
+ or deflateInit2(). This would be used to allocate an output buffer
+ for deflation in a single pass, and so would be called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the
+ bits leftover from a previous deflate stream when appending to it. As such,
+ this function can only be used for raw deflate, and must be used before the
+ first deflate() call after a deflateInit2() or deflateReset(). bits must be
+ less than or equal to 16, and that many of the least significant bits of
+ value will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
+ a crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
+ is set to null if there is no error message. inflateInit2 does not perform
+ any decompression apart from reading the zlib header if present: this will
+ be done by inflate(). (So next_in and avail_in may be modified, but next_out
+ and avail_out are unchanged.)
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been found,
+ or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
+ case, the application may save the current current value of total_in which
+ indicates where valid compressed data was found. In the error case, the
+ application may repeatedly call inflateSync, providing more input each time,
+ until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+ The stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK can be used to
+ force inflate() to return immediately after header processing is complete
+ and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When
+ any of extra, name, or comment are not Z_NULL and the respective field is
+ not present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not
+ be allocated, or Z_VERSION_ERROR if the version of the library does not
+ match the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free
+ the allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects
+ only the raw deflate stream to decompress. This is different from the
+ normal behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format
+ error in the deflate stream (in which case strm->msg is set to indicate the
+ nature of the error), or Z_STREAM_ERROR if the stream was not properly
+ initialized. In the case of Z_BUF_ERROR, an input or output error can be
+ distinguished using strm->next_in which will be Z_NULL only if in() returned
+ an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
+ out() returning non-zero. (in() will always be called before out(), so
+ strm->next_in is assured to be defined if out() returns non-zero.) Note
+ that inflateBack() cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the
+ basic stream-oriented functions. To simplify the interface, some
+ default options are assumed (compression level and memory usage,
+ standard memory allocation functions). The source code of these
+ utility functions can easily be modified if you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be at least the value returned
+ by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+ This function can be used to compress a whole file at once if the
+ input file is mmap'ed.
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before
+ a compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be large enough to hold the
+ entire uncompressed data. (The size of the uncompressed data must have
+ been saved previously by the compressor and transmitted to the decompressor
+ by some mechanism outside the scope of this compression library.)
+ Upon exit, destLen is the actual size of the compressed buffer.
+ This function can be used to decompress a whole file at once if the
+ input file is mmap'ed.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+typedef voidp gzFile;
+
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+/*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+ ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
+ Huffman only compression as in "wb1h", or 'R' for run-length encoding
+ as in "wb1R". (See the description of deflateInit2 for more information
+ about the strategy parameter.)
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+ fileno (in the file has been previously opened with fopen).
+ The mode parameter is as in gzopen.
+ The next call of gzclose on the returned gzFile will also close the
+ file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
+ descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
+ gzdopen returns NULL if there was insufficient memory to allocate
+ the (de)compression state.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+ (0 in case of error).
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written (0 in case of error). The number of
+ uncompressed bytes written is limited to 4095. The caller should assure that
+ this limit is not exceeded. If it is exceeded, then gzprintf() will return
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. The string is then terminated with a null
+ character.
+ gzgets returns buf, or Z_NULL in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read again later.
+ Only one character of push-back is allowed. gzungetc() returns the
+ character pushed, or -1 on failure. gzungetc() will fail if a
+ character has been pushed but not read yet, or if c is -1. The pushed
+ character will be discarded if the stream is repositioned with gzseek()
+ or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+ error number (see function gzerror below). gzflush returns Z_OK if
+ the flush parameter is Z_FINISH and all output could be flushed.
+ gzflush should be called only when strictly necessary because it can
+ degrade compression.
+*/
+
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+/*
+ Sets the starting position for the next gzread or gzwrite on the
+ given compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+/*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns 1 if file is being read directly without decompression, otherwise
+ zero.
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+ error occurred in the file system and not in the compression library,
+ errnum is set to Z_ERRNO and the application may consult errno
+ to get the exact error code.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the
+ compression library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+/*
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+ value for the for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+/*
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/zutil.c b/tinySIGCOMP/src/zutil.c
new file mode 100644
index 0000000..dab7e2f
--- /dev/null
+++ b/tinySIGCOMP/src/zutil.c
@@ -0,0 +1,322 @@
+#if !HAS_ZLIB
+/* zutil.c -- target dependent utility functions for the compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#include "zutil.h"
+
+#ifndef NO_DUMMY_DECL
+struct internal_state {int dummy;}; /* for buggy compilers */
+#endif
+
+const char * const z_errmsg[10] = {
+"need dictionary", /* Z_NEED_DICT 2 */
+"stream end", /* Z_STREAM_END 1 */
+"", /* Z_OK 0 */
+"file error", /* Z_ERRNO (-1) */
+"stream error", /* Z_STREAM_ERROR (-2) */
+"data error", /* Z_DATA_ERROR (-3) */
+"insufficient memory", /* Z_MEM_ERROR (-4) */
+"buffer error", /* Z_BUF_ERROR (-5) */
+"incompatible version",/* Z_VERSION_ERROR (-6) */
+""};
+
+
+const char * ZEXPORT zlibVersion()
+{
+ return ZLIB_VERSION;
+}
+
+uLong ZEXPORT zlibCompileFlags()
+{
+ uLong flags;
+
+ flags = 0;
+ switch (sizeof(uInt)) {
+ case 2: break;
+ case 4: flags += 1; break;
+ case 8: flags += 2; break;
+ default: flags += 3;
+ }
+ switch (sizeof(uLong)) {
+ case 2: break;
+ case 4: flags += 1 << 2; break;
+ case 8: flags += 2 << 2; break;
+ default: flags += 3 << 2;
+ }
+ switch (sizeof(voidpf)) {
+ case 2: break;
+ case 4: flags += 1 << 4; break;
+ case 8: flags += 2 << 4; break;
+ default: flags += 3 << 4;
+ }
+ switch (sizeof(z_off_t)) {
+ case 2: break;
+ case 4: flags += 1 << 6; break;
+ case 8: flags += 2 << 6; break;
+ default: flags += 3 << 6;
+ }
+#ifdef DEBUG
+ flags += 1 << 8;
+#endif
+#if defined(ASMV) || defined(ASMINF)
+ flags += 1 << 9;
+#endif
+#ifdef ZLIB_WINAPI
+ flags += 1 << 10;
+#endif
+#ifdef BUILDFIXED
+ flags += 1 << 12;
+#endif
+#ifdef DYNAMIC_CRC_TABLE
+ flags += 1 << 13;
+#endif
+#ifdef NO_GZCOMPRESS
+ flags += 1L << 16;
+#endif
+#ifdef NO_GZIP
+ flags += 1L << 17;
+#endif
+#ifdef PKZIP_BUG_WORKAROUND
+ flags += 1L << 20;
+#endif
+#ifdef FASTEST
+ flags += 1L << 21;
+#endif
+#ifdef STDC
+# ifdef NO_vsnprintf
+ flags += 1L << 25;
+# ifdef HAS_vsprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_vsnprintf_void
+ flags += 1L << 26;
+# endif
+# endif
+#else
+ flags += 1L << 24;
+# ifdef NO_snprintf
+ flags += 1L << 25;
+# ifdef HAS_sprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_snprintf_void
+ flags += 1L << 26;
+# endif
+# endif
+#endif
+ return flags;
+}
+
+#ifdef DEBUG
+
+# ifndef verbose
+# define verbose 0
+# endif
+int z_verbose = verbose;
+
+void z_error (m)
+ char *m;
+{
+ fprintf(stderr, "%s\n", m);
+ exit(1);
+}
+#endif
+
+/* exported to allow conversion of error code to string for compress() and
+ * uncompress()
+ */
+const char * ZEXPORT zError(err)
+ int err;
+{
+ return ERR_MSG(err);
+}
+
+#if defined(_WIN32_WCE)
+ /* The Microsoft C Run-Time Library for Windows CE doesn't have
+ * errno. We define it as a global variable to simplify porting.
+ * Its value is always 0 and should not be used.
+ */
+ int errno = 0;
+#endif
+
+#ifndef HAVE_MEMCPY
+
+void zmemcpy(dest, source, len)
+ Bytef* dest;
+ const Bytef* source;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = *source++; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+
+int zmemcmp(s1, s2, len)
+ const Bytef* s1;
+ const Bytef* s2;
+ uInt len;
+{
+ uInt j;
+
+ for (j = 0; j < len; j++) {
+ if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
+ }
+ return 0;
+}
+
+void zmemzero(dest, len)
+ Bytef* dest;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = 0; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+#endif
+
+
+#ifdef SYS16BIT
+
+#ifdef __TURBOC__
+/* Turbo C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
+ * and farmalloc(64K) returns a pointer with an offset of 8, so we
+ * must fix the pointer. Warning: the pointer must be put back to its
+ * original form in order to free it, use zcfree().
+ */
+
+#define MAX_PTR 10
+/* 10*64K = 640K */
+
+local int next_ptr = 0;
+
+typedef struct ptr_table_s {
+ voidpf org_ptr;
+ voidpf new_ptr;
+} ptr_table;
+
+local ptr_table table[MAX_PTR];
+/* This table is used to remember the original form of pointers
+ * to large buffers (64K). Such pointers are normalized with a zero offset.
+ * Since MSDOS is not a preemptive multitasking OS, this table is not
+ * protected from concurrent access. This hack doesn't work anyway on
+ * a protected system like OS/2. Use Microsoft C instead.
+ */
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ voidpf buf = opaque; /* just to make some compilers happy */
+ ulg bsize = (ulg)items*size;
+
+ /* If we allocate less than 65520 bytes, we assume that farmalloc
+ * will return a usable pointer which doesn't have to be normalized.
+ */
+ if (bsize < 65520L) {
+ buf = farmalloc(bsize);
+ if (*(ush*)&buf != 0) return buf;
+ } else {
+ buf = farmalloc(bsize + 16L);
+ }
+ if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
+ table[next_ptr].org_ptr = buf;
+
+ /* Normalize the pointer to seg:0 */
+ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
+ *(ush*)&buf = 0;
+ table[next_ptr++].new_ptr = buf;
+ return buf;
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ int n;
+ if (*(ush*)&ptr != 0) { /* object < 64K */
+ farfree(ptr);
+ return;
+ }
+ /* Find the original pointer */
+ for (n = 0; n < next_ptr; n++) {
+ if (ptr != table[n].new_ptr) continue;
+
+ farfree(table[n].org_ptr);
+ while (++n < next_ptr) {
+ table[n-1] = table[n];
+ }
+ next_ptr--;
+ return;
+ }
+ ptr = opaque; /* just to make some compilers happy */
+ Assert(0, "zcfree: ptr not found");
+}
+
+#endif /* __TURBOC__ */
+
+
+#ifdef M_I86
+/* Microsoft C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
+# define _halloc halloc
+# define _hfree hfree
+#endif
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ return _halloc((long)items, size);
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ _hfree(ptr);
+}
+
+#endif /* M_I86 */
+
+#endif /* SYS16BIT */
+
+
+#ifndef MY_ZCALLOC /* Any system without a special alloc function */
+
+#ifndef STDC
+extern voidp malloc OF((uInt size));
+extern voidp calloc OF((uInt items, uInt size));
+extern void free OF((voidpf ptr));
+#endif
+
+voidpf zcalloc (opaque, items, size)
+ voidpf opaque;
+ unsigned items;
+ unsigned size;
+{
+ if (opaque) items += size - size; /* make compiler happy */
+ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
+ (voidpf)calloc(items, size);
+}
+
+void zcfree (opaque, ptr)
+ voidpf opaque;
+ voidpf ptr;
+{
+ free(ptr);
+ if (opaque) return; /* make compiler happy */
+}
+
+#endif /* MY_ZCALLOC */
+
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/src/zutil.h b/tinySIGCOMP/src/zutil.h
new file mode 100644
index 0000000..3761182
--- /dev/null
+++ b/tinySIGCOMP/src/zutil.h
@@ -0,0 +1,272 @@
+#if !HAS_ZLIB
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZUTIL_H
+#define ZUTIL_H
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+#if defined(STDC) && !defined(__SYMBIAN32__)
+# ifndef _WIN32_WCE
+# include <stddef.h>
+# endif
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+# ifdef _WIN32_WCE
+ /* The Microsoft C Run-Time Library for Windows CE doesn't have
+ * errno. We define it as a global variable to simplify porting.
+ * Its value is always 0 and should not be used. We rename it to
+ * avoid conflict with other libraries that use the same workaround.
+ */
+# define errno z_errno
+# endif
+ extern int errno;
+#else
+# ifndef _WIN32_WCE
+# include <errno.h>
+# endif
+#endif
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+/* (size given to avoid silly warnings with Visual C++) */
+
+#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+
+#define ERR_RETURN(strm,err) \
+ return (strm->msg = (char*)ERR_MSG(err), (err))
+/* To be used only when the state is known to be valid */
+
+ /* common constants */
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+ /* target dependencies */
+
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
+# define OS_CODE 0x00
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef AMIGA
+# define OS_CODE 0x01
+#endif
+
+#if defined(VAXC) || defined(VMS)
+# define OS_CODE 0x02
+# define F_OPEN(name, mode) \
+ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
+#endif
+
+#if defined(ATARI) || defined(atarist)
+# define OS_CODE 0x05
+#endif
+
+#ifdef OS2
+# define OS_CODE 0x06
+# ifdef M_I86
+ #include <malloc.h>
+# endif
+#endif
+
+#if defined(MACOS) || defined(TARGET_OS_MAC)
+# define OS_CODE 0x07
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
+# endif
+#endif
+
+#ifdef TOPS20
+# define OS_CODE 0x0a
+#endif
+
+#ifdef WIN32
+# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
+# define OS_CODE 0x0b
+# endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+# define OS_CODE 0x0f
+#endif
+
+#if defined(_BEOS_) || defined(RISCOS)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+#endif
+
+#if (defined(_MSC_VER) && (_MSC_VER > 600))
+# if defined(_WIN32_WCE)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+# else
+# define fdopen(fd,type) _fdopen(fd,type)
+# endif
+#endif
+
+ /* common defaults */
+
+#ifndef OS_CODE
+# define OS_CODE 0x03 /* assume Unix */
+#endif
+
+#ifndef F_OPEN
+# define F_OPEN(name, mode) fopen((name), (mode))
+#endif
+
+ /* functions */
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+ /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+#endif
+#ifdef VMS
+# define NO_vsnprintf
+#endif
+
+#if defined(pyr)
+# define NO_MEMCPY
+#endif
+#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
+ /* Use our own functions for small and medium model with MSC <= 5.0.
+ * You may have to use the same strategy for Borland C (untested).
+ * The __SC__ check is for Symantec.
+ */
+# define NO_MEMCPY
+#endif
+#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
+# define HAVE_MEMCPY
+#endif
+#ifdef HAVE_MEMCPY
+# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
+# define zmemcpy _fmemcpy
+# define zmemcmp _fmemcmp
+# define zmemzero(dest, len) _fmemset(dest, 0, len)
+# else
+# define zmemcpy memcpy
+# define zmemcmp memcmp
+# define zmemzero(dest, len) memset(dest, 0, len)
+# endif
+#else
+ extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ extern void zmemzero OF((Bytef* dest, uInt len));
+#endif
+
+/* Diagnostic functions */
+#ifdef DEBUG
+# include <stdio.h>
+ extern int z_verbose;
+ extern void z_error OF((char *m));
+# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
+# define Trace(x) {if (z_verbose>=0) fprintf x ;}
+# define Tracev(x) {if (z_verbose>0) fprintf x ;}
+# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
+# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
+# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
+#else
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+#endif
+
+
+voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
+void zcfree OF((voidpf opaque, voidpf ptr));
+
+#define ZALLOC(strm, items, size) \
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
+#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
+#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+
+#endif /* ZUTIL_H */
+#endif // HAS_ZLIB
+
diff --git a/tinySIGCOMP/test/rfc4465_torture_tests.h b/tinySIGCOMP/test/rfc4465_torture_tests.h
new file mode 100644
index 0000000..ae88f7a
--- /dev/null
+++ b/tinySIGCOMP/test/rfc4465_torture_tests.h
@@ -0,0 +1,617 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+#ifndef _RFC4465_TORTURE_TESTS_H_
+#define _RFC4465_TORTURE_TESTS_H_
+
+typedef struct rfc4465_struct_torture_test
+{
+ const char* section_name;
+ const char* bytecode;
+ size_t bytecode_size;
+ const char* xoutput; // Excepted output
+ size_t xcycles; // Excepted cycles
+ int stream;
+ int xfail;
+}
+struct_torture_test, *lpstruct_torture_test;
+
+/*************************************************************
+*** A.1.1. Bit Manipulation
+*/
+#define RFC4465_A_1_1__Bit_Manipulation \
+ "\xf8\x0a\x71\x16\xa0\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xc0\x00\xff\x80\x55\x55\x02\x20\x2a\x03\x21\x04\x20\x03\x05\x21\xff\x22\x86\x04\x01\x20\xc0\xff\x02\x20\x60\x03\x20\x04\x21\x60\x05\x20\x61\x22\x86\x04\x23"
+
+
+/*************************************************************
+*** A.1.2. Arithmetic
+*/
+#define RFC4465_A_1_2__Arithmetic \
+ "\xf8\x0a\xa1\x1c\x01\xa0\x45\x0b\x07\x22\x01\x16\xa0\x77\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xc0\x00\xff\x99\x41\x07\x20\x01\x08\x20\xa3\xe9\x09\x20\xa0\x65\x0a\x20\x0b\x22\x86\x04\x06\x21\xc0\xff\x07\x21\x62\x08\x21\x61\x09\x20\x61\x0a\x21\x62\x22\x86\x04\x23" \
+ "\x00"
+
+/*************************************************************
+*** A.1.3. Sorting
+*/
+#define RFC4465_A_1_3__Sorting \
+ "\xf8\x0d\xc1\x0c\x88\x02\x17\x0b\x88\x02\x17\x22\xa1\x2e\x2d\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x11\x00\x07\x00\x16\x00\x03\x00\x03\x00\x03\x00\x13\x00\x01\x00\x10\x00\x0e\x00\x08\x00\x02\x00\x0d\x00\x14\x00\x12\x00\x17\x00\x0f\x00\x15\x00\x0c\x00\x06\x00\x09\x6e\x67\x20\x69\x75\x69\x20\x74\x69\x74\x2c\x20\x79\x6f\x75\x27\x20\x53\x46\x6f\x6e\x67\x61\x20\x75\x72\x72\x64\x6f\x20\x74\x6f\x6e\x2e\x2e\x00\x70\x65\x70\x20\x6e\x74\x72\x65\x6e\x69"
+
+
+/*************************************************************
+*** A.1.4. SHA-1
+*/
+#define RFC4465_A_1_4__SHA1 \
+ "\xf8\x08\x71\x0d\xa0\xc3\x03\xa0\x44\x22\xa0\x44\x14\x0d\xa0\xc6\x38\xa0\x44\x22\xa0\x44\x14\x0e\x86\xa0\xfe\x0e\xa0\x42\xa0\xff\x0d\xa0\xfe\x8e\xa0\x44\x22\xa0\x44\x14\x0e\x86\xa0\xff\x0e\xa0\x42\xa1\x07\x0d\xa0\xff\xa2\x80\xa0\xff\x22\xa0\xff\x14\x23\x00\x00\x00\x00\x00\x00\x00\x61\x62\x63\x61\x62\x63\x64\x62\x63\x64\x65\x63\x64\x65\x66\x64\x65\x66\x67\x65\x66\x67\x68\x66\x67\x68\x69\x67\x68\x69\x6a\x68\x69\x6a\x6b\x69\x6a\x6b\x6c\x6a\x6b\x6c\x6d\x6b\x6c\x6d\x6e\x6c\x6d\x6e\x6f\x6d\x6e\x6f\x70\x6e\x6f\x70\x71\x61\x30\x31\x32\x33\x34\x35\x36\x37"
+
+
+/*************************************************************
+*** A.1.5. LOAD and MULTILOAD
+*/
+#define RFC4465_A_1_5__LOAD_and_MULTILOAD \
+ "\xf8\x03\x61\x0e\x87\xa0\x84\x0e\xa0\x82\xc0\x80\x0e\xc0\x80\xa0\x86\x0e\xc0\x84\xc0\x84\x22\x87\x08\x1c\x01\xa0\x41\x27\x08\x20\x02\x06\x20\x3c\x0f\x60\x03\xa0\xa2\xa0\xb1\x87\x0f\x60\x04\x2a\x87\xc0\x80\xc0\x84\x22\x87\x08\x23" \
+ "\x00"
+
+
+/*************************************************************
+*** A.1.6. COPY
+*/
+#define RFC4465_A_1_6__COPY \
+ "\xf8\x03\x91\x0e\x20\x8e\x0e\x86\x86\x0e\xa0\x42\x87\x12\x20\x87\x21\x0e\x86\x80\x41\x00\x12\x86\xa0\x55\xa0\x41\x22\x20\xa0\x77\x0e\x86\x20\x0e\xa0\x42\x30\x15\x20\x04\xa0\x41\x01\x12\x20\x04\x30\x22\x30\x04\x12\x30\x04\x2e\x22\x20\x02\x23"
+
+
+/*************************************************************
+*** A.1.7. COPY-LITERAL and COPY-OFFSET
+*/
+#define RFC4465_A_1_7__COPY_LITERAL_and_COPY_OFFSET \
+ "\xf8\x06\x11\x0e\x20\x80\x41\x00\x0e\x86\x86\x0e\xa0\x42\x87\x0e\xa0\x44\x21\x13\x20\x87\x22\x22\x86\x08\x0e\xa0\x44\xa0\x9c\x13\x20\x02\x22\x22\xa0\x9c\x02\x0e\x86\xa0\x48\x0e\xa0\x42\xa0\x52\x0e\xa0\x44\xa0\x52\x15\xa0\x48\x0a\xa0\x41\x01\x14\x02\x06\x22\x0e\xa0\x46\x06\x14\x63\x04\x22\x22\x61\x0a\x0e\xa0\x44\xa0\x50\x14\x04\x04\x22\x22\xa0\x44\x02\x14\x05\x04\x22\x22\xa0\x44\x02\x22\x60\x0a\x23"
+
+
+/*************************************************************
+*** A.1.8. MEMSET
+*/
+#define RFC4465_A_1_8__MEMSET \
+ "\xf8\x01\x81\x0e\x86\x87\x0e\xa0\x42\xa0\x81\x15\x86\xa0\x81\x00\x01\x15\xa0\x81\x0f\x86\x0f\x22\x87\x10\x23"
+
+
+/*************************************************************
+*** A.1.9. CRC
+*/
+#define RFC4465_A_1_9__CRC \
+ "\xf8\x01\x81\x15\xa0\x46\x18\x01\x01\x15\xa0\x5e\x14\x87\x01\x1c\x02\xa0\x44\x13\x1b\x62\xa0\x46\x2c\x0e\x23"\
+ "\x62\xcb"
+
+
+/*************************************************************
+*** A.1.10. INPUT-BITS
+*/
+#define RFC4465_A_1_10__INPUT_BITS \
+ "\xf8\x01\x51\x1d\x62\xa0\x46\x14\x22\xa0\x46\x02\x06\x22\x01\x0a\x22\x07\x06\x22\x01\x16\xee\x23"\
+ "\x93\x2e\xac\x71"
+
+
+/*************************************************************
+*** A.1.11. INPUT-HUFFMAN
+*/
+#define RFC4465_A_1_11__INPUT_HUFFMAN \
+ "\xf8\x01\xd1\x1e\xa0\x46\x1c\x02\x62\x00\x62\x62\x62\x00\xff\x00\x22\xa0\x46\x02\x06\x22\x01\x0a\x22\x07\x06\x22\x01\x16\xe6\x23"\
+ "\x93\x2e\xac\x71\x66\xd8\x6f"
+
+
+
+/*************************************************************
+*** A.1.12. INPUT-BYTES
+*/
+#define RFC4465_A_1_12__INPUT_BYTES \
+ "\xf8\x02\x71\x0e\x86\xa0\x48\x0e\xa0\x42\xa0\x4c\x1d\x62\xa0\x46\x1d\x22\xa0\x46\x02\x06\x22\x02\x0a\x22\x07\x1c\x62\xa0\x48\x0e\x22\xa0\x48\x62\x06\x22\x01\x16\xe5\x23"\
+ "\x93\x2e\xac\x71\x66\xd8\x6f\xb1\x59\x2b\xdc\x9a\x97\x34\xd8\x47\xa7\x33\x87\x4e\x1b\xcb\xcd\x51\xb5\xdc\x96\x59\x9d\x6a"
+
+
+/*************************************************************
+*** A.1.13. Stack Manipulation
+*/
+#define RFC4465_A_1_13__Stack_Manipulation \
+ "\xf8\x14\x11\x0e\xa0\x46\x86\x10\x02\x10\x60\x10\xa0\x42\x22\x86\x08\x11\x86\x11\x63\x11\xa0\x46\x22\x86\x08\x16\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xa0\x46\x20\x0e\xa0\x48\xa1\x40\x07\x24\x88\x18\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xa0\x46\xa1\x7f\x0e\xa1\x7f\x1a\x0f\xa1\xb0\x03\x01\x80\xc0\x01\x8f\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23"
+
+
+/*************************************************************
+*** A.1.14. Program Flow
+*/
+#define RFC4465_A_1_14__Program_Flow \
+ "\xf8\x03\xf1\x0e\xa0\x44\x04\x0e\x86\xa0\x92\x07\x20\xa0\x90\x22\xa0\x43\x01\x16\x60\x06\x21\x01\x0e\x86\xa0\x84\x07\x20\xa0\xa1\x22\xa0\x43\x01\x17\x61\x06\x60\xf1\x06\x07\x22\x01\x0e\x86\xa0\x84\x07\x20\xa0\xb6\x22\xa0\x43\x01\x1a\x04\x62\x08\x60\x9f\xdc\xf1\x23"
+
+
+/*************************************************************
+*** A.1.15. State Creation_1
+*/
+#define RFC4465_A_1_15__State_Creation_1 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x01"
+
+
+/*************************************************************
+*** A.1.15. State Creation_2
+*/
+#define RFC4465_A_1_15__State_Creation_2 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x02"
+
+
+/*************************************************************
+*** A.1.15. State Creation_3
+*/
+#define RFC4465_A_1_15__State_Creation_3 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x03"
+
+
+/*************************************************************
+*** A.1.15. State Creation_4
+*/
+#define RFC4465_A_1_15__State_Creation_4 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x04\x05"
+
+
+/*************************************************************
+*** A.1.15. State Creation_5
+*/
+#define RFC4465_A_1_15__State_Creation_5 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x04\x15"
+
+
+/*************************************************************
+*** A.1.15. State Creation_6
+*/
+#define RFC4465_A_1_15__State_Creation_6 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x04\x06"
+
+
+/*************************************************************
+*** A.1.15. State Creation_7
+*/
+#define RFC4465_A_1_15__State_Creation_7 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x09"
+
+
+/*************************************************************
+*** A.1.15. State Creation_8
+*/
+#define RFC4465_A_1_15__State_Creation_8 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x1e\x06"
+
+
+/*************************************************************
+*** A.1.15. State Creation_9
+*/
+#define RFC4465_A_1_15__State_Creation_9 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x1e\x07"
+
+
+/*************************************************************
+*** A.1.15. State Creation_10
+*/
+#define RFC4465_A_1_15__State_Creation_10 \
+ "\xf8\x09\x41\x1c\x01\xa0\x45\xff\x04\x22\x0b\x17\x62\x8f\x0d\x06\x06\x20\x0a\xa1\x0a\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x0c\x06\x06\x20\x0a\x88\x00\x14\x00\x04\x22\x01\x17\x62\x8f\x16\x06\x06\x1c\x01\xa0\x47\x9f\xd2\x21\xa0\x48\x63\x12\xa0\xe3\x63\xa0\x48\x04\x22\x01\x17\x62\x8f\x0a\x06\x06\x21\xa0\xe3\x06\x04\x22\x01\x17\x62\x8f\x0e\x06\x06\x23\x00\x00\x0a\x88\x00\x14\x00\x23\x00\x00\x00\x00\x00\x00\x00\x43\x7a\xe8\x0a\x0f\xdc\x1e\x6a\x87\xc1\xb6\x2a\x76\x76\xb9\x73\x31\x8c\x0e\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xcc\x3f\xee\x79\xbc\xfc\x8f\xd1\x08\x65\xe8\x03\x52\xee\x29\x77\x17\xdf\x57"\
+ "\x1e\14"
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS Set up bytecode}
+*/
+#define RFC4465_A_1_16__STATE_ACCESS__SETUP \
+ "\xf8\x19\x01\x23\x00\x00\x10\x89\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\xa2\x0c\x04\x23\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74"\
+ ""
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS_1
+*/
+#define RFC4465_A_1_16__STATE_ACCESS_1 \
+ "\xf8\x19\x41\x1c\x01\xa0\x45\xff\x17\x62\x01\x06\x0d\x1c\x1f\x89\x14\x00\x00\x00\x89\x1f\x89\x14\x0c\x04\xa0\x46\x00\x22\xa0\x46\x04\x16\xa1\x46\x17\x62\x03\x06\x10\x1b\x1f\x87\x14\x00\x00\x00\x00\x16\xa1\x36\x1f\x89\x13\x06\x04\xa0\x46\x00\x16\xa1\x2b\x1f\x89\x14\x0c\x05\xa0\x46\x00\x16\xa1\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xf8\xbc\x3e\x20\x93\xb5\xab\xe1\xf1\x70\x13\x42\x4c\xe7\xfe\x05\xe0\x69\x39"\
+ "\x00"
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS_2
+*/
+#define RFC4465_A_1_16__STATE_ACCESS_2 \
+ "\xf8\x19\x41\x1c\x01\xa0\x45\xff\x17\x62\x01\x06\x0d\x1c\x1f\x89\x14\x00\x00\x00\x89\x1f\x89\x14\x0c\x04\xa0\x46\x00\x22\xa0\x46\x04\x16\xa1\x46\x17\x62\x03\x06\x10\x1b\x1f\x87\x14\x00\x00\x00\x00\x16\xa1\x36\x1f\x89\x13\x06\x04\xa0\x46\x00\x16\xa1\x2b\x1f\x89\x14\x0c\x05\xa0\x46\x00\x16\xa1\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xf8\xbc\x3e\x20\x93\xb5\xab\xe1\xf1\x70\x13\x42\x4c\xe7\xfe\x05\xe0\x69\x39"\
+ "\x01"
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS_3
+*/
+#define RFC4465_A_1_16__STATE_ACCESS_3 \
+ "\xf8\x19\x41\x1c\x01\xa0\x45\xff\x17\x62\x01\x06\x0d\x1c\x1f\x89\x14\x00\x00\x00\x89\x1f\x89\x14\x0c\x04\xa0\x46\x00\x22\xa0\x46\x04\x16\xa1\x46\x17\x62\x03\x06\x10\x1b\x1f\x87\x14\x00\x00\x00\x00\x16\xa1\x36\x1f\x89\x13\x06\x04\xa0\x46\x00\x16\xa1\x2b\x1f\x89\x14\x0c\x05\xa0\x46\x00\x16\xa1\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xf8\xbc\x3e\x20\x93\xb5\xab\xe1\xf1\x70\x13\x42\x4c\xe7\xfe\x05\xe0\x69\x39"\
+ "\x02"
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS_4
+*/
+#define RFC4465_A_1_16__STATE_ACCESS_4 \
+ "\xf8\x19\x41\x1c\x01\xa0\x45\xff\x17\x62\x01\x06\x0d\x1c\x1f\x89\x14\x00\x00\x00\x89\x1f\x89\x14\x0c\x04\xa0\x46\x00\x22\xa0\x46\x04\x16\xa1\x46\x17\x62\x03\x06\x10\x1b\x1f\x87\x14\x00\x00\x00\x00\x16\xa1\x36\x1f\x89\x13\x06\x04\xa0\x46\x00\x16\xa1\x2b\x1f\x89\x14\x0c\x05\xa0\x46\x00\x16\xa1\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xf8\xbc\x3e\x20\x93\xb5\xab\xe1\xf1\x70\x13\x42\x4c\xe7\xfe\x05\xe0\x69\x39"\
+ "\x03"
+
+
+/*************************************************************
+*** A.1.16. STATE-ACCESS_5
+*/
+#define RFC4465_A_1_16__STATE_ACCESS_5 \
+ "\xf8\x19\x41\x1c\x01\xa0\x45\xff\x17\x62\x01\x06\x0d\x1c\x1f\x89\x14\x00\x00\x00\x89\x1f\x89\x14\x0c\x04\xa0\x46\x00\x22\xa0\x46\x04\x16\xa1\x46\x17\x62\x03\x06\x10\x1b\x1f\x87\x14\x00\x00\x00\x00\x16\xa1\x36\x1f\x89\x13\x06\x04\xa0\x46\x00\x16\xa1\x2b\x1f\x89\x14\x0c\x05\xa0\x46\x00\x16\xa1\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\xf8\xbc\x3e\x20\x93\xb5\xab\xe1\xf1\x70\x13\x42\x4c\xe7\xfe\x05\xe0\x69\x39"\
+ "\x04"
+
+
+/*************************************************************
+*** A.2.1. Useful Values_1
+*/
+#define RFC4465_A_2_1__Useful_Values_1 \
+ "\xf8\x05\xf1\x0e\x86\x20\x0e\xa0\x42\x21\x1c\x01\xa0\x47\xf8\x17\x42\x63\xf3\x06\xf3\x17\x43\x00\xed\x06\x0c\x17\x44\x00\xe7\x3f\xe7\x17\x44\xa3\xc0\xe1\x07\xe1\x1c\x01\xa0\x47\x9f\xda\x06\x23\x40\x07\x23\x01\x12\x20\x01\x63\x1c\x01\xa0\x49\x9f\xca\x0e\xa0\x44\x43\x06\x22\x03\x08\x22\x08\x06\x22\xa3\xe8\x08\x22\x41\x06\x22\x64\x07\x22\xa3\x58\x12\x20\x62\x20\x23\x00\x00\xa3\xc0\x86\x87\x06"\
+ "\x02"
+
+
+/*************************************************************
+*** A.2.1. Useful Values_2
+*/
+#define RFC4465_A_2_1__Useful_Values_2 \
+ "\xf9\x3a\xdb\x1d\x3d\x20\xaa"\
+ "\x00\x00"
+ // 7+2\9
+ //"\xf9\x3a\xdb\x1d\x3d\x20\xaa"
+
+
+/*************************************************************
+*** A.2.1. Useful Values_3
+*/
+#define RFC4465_A_2_1__Useful_Values_3 \
+ "\xf9\x3a\xdb\x1d\x3d\x20\xaa"\
+ "\x00\x01"
+
+
+/*************************************************************
+*** A.2.1. Useful Values_4
+*/
+#define RFC4465_A_2_1__Useful_Values_4 \
+ "\xf9\x3a\xdb\x1d\x3d\x20\xaa"\
+ "\x01\x00"
+
+
+/*************************************************************
+*** A.2.2. Cycles Checking
+*/
+#define RFC4465_A_2_2__Cycles_Checking \
+ "\xf8\x01\xa1\x0f\x86\x04\x20\x29\x00\x22\x12\xa0\x44\x02\x60\x14\x02\xa0\x64\x23\x22\xa0\x44\x02\x06\x22\x01\x16\xef"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_1 \
+ "\xf8"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_2 \
+ "\xf8\x00"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_3 \
+ "\xf8\x00\xe1\x06\x00\x11\x22\x00\x02\x23\x00\x00\x00\x00\x00\x00\x01"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_4 \
+ "\xf8\x00\xf1\x06\x00\x11\x22\x00\x02\x23\x00\x00\x00\x00\x00\x00\x01"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_5 \
+ "\xf8\x00\xe0\x06\x00\x11\x22\x00\x02\x23\x00\x00\x00\x00\x00\x00\x01"\
+ ""
+
+
+/*************************************************************
+*** A.2.3. Message-based Transport
+*/
+#define RFC4465_A_2_3_Message_based_Transport_6 \
+ "\xf8\x00\xee\x06\x00\x11\x22\x00\x02\x23\x00\x00\x00\x00\x00\x00\x01"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_1
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_1\
+ "\xff\xff\xf8\x01\x71\x08\x00\x02\x22\x00\x02\x22\xa0\x92\x05\x23\x00\x00\x00\x00\x00\x00\x00\xff\x00\xff\x03\xff\xff\xff\xff\xff\xff\xff\xf8\x01\x7e\x08\x00\x02\x22\x00\x02\x22\xa3\xd2\x05\x23\x00\x00\x00\x00\x00\x00\x00\xff\x04\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_2
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_2\
+ "\xff\xff\xf8\x01\x71\x08\x00\x02\x22\x00\x02\x22\xa0\x92\x05\x23\x00\x00\x00\x00\x00\x00\x00\xff\x00\xff\x03\xff\xff\xff\xff\xff\xff\xff\xf8\x01\x7e\x08\x00\x02\x22\x00\x02\x22\xa3\xd2\x05\x23\x00\x00\x00\x00\x00\x00\x00\xff\x04\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_3
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_3\
+ "\xf8\xff\xff"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_4
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_4\
+ "\xf8\x00\xff\xff"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_5
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_5\
+ "\xf8\x01\x81\x08\x00\x02\x22\x00\x02\x22\xa0\x92\x05\x23\xff\xff\x00\x00\x00\x00\x00\x00\x00\xff\x00\xff\x03\xff\xff\xff"\
+ ""
+
+
+/*************************************************************
+*** A.2.4. Stream-based Transport_6
+*/
+#define RFC4465_A_2_4_Stream_based_Transport_6\
+ "\xf8\x01\x70\x08\x00\x02\x22\x00\x02\x22\xa0\x92\x05\x23\xff\xff\x00\x00\x00\x00\x00\x00\x00\xff\x04\xff\xff\xff\xff"\
+ ""
+
+
+
+/*************************************************************
+*** A.2.5. Input Past the End of a Message_1
+*/
+#define RFC4465_A_2_5__Input_Past_the_End_of_a_Message_1\
+ "\xf8\x03\x21\x0e\x86\xa0\x46\x0e\xa0\x42\xa0\x4d\x1d\x09\xa0\x46\x0a\x1c\x07\xa0\x46\x06\x00\x1d\x07\xa0\x46\xff\x1c\x02\xa0\x46\xfa\x22\xa0\x46\x02\x1d\x10\xa0\x46\x06\x00\x1d\x08\xa0\x46\xff\x22\xa0\x47\x01\x23"\
+ "\xff\xfa\x00\x68\x69\x21"
+
+
+/*************************************************************
+*** A.2.5. Input Past the End of a Message_2
+*/
+#define RFC4465_A_2_5__Input_Past_the_End_of_a_Message_2\
+ "\xf8\x03\x21\x0e\x86\xa0\x46\x0e\xa0\x42\xa0\x4d\x1d\x09\xa0\x46\x0a\x1c\x07\xa0\x46\x06\x00\x1d\x07\xa0\x46\xff\x1c\x02\xa0\x46\xfa\x22\xa0\x46\x02\x1d\x10\xa0\x46\x06\x00\x1d\x08\xa0\x46\xff\x22\xa0\x47\x01\x23"\
+ "\xff\xfa\x00\x68\x69"
+
+
+
+/*************************************************************
+*** A.3.1. SigComp Feedback Mechanism_1
+*/
+#define RFC4465_A_3_1__SigComp_Feedback_Mechanism_1\
+ "\xf8\x05\x03\x1c\x01\xa0\x41\xa0\x55\x17\x60\x01\x07\x0e\xa0\x4f\x0e\xa0\x42\xa4\x7f\x16\x0e\x0e\xa0\x42\xa4\xff\x15\xa0\x44\xa0\x7f\x01\x01\x0e\xa0\xc3\xa8\x01\x0e\xa0\xc5\xa6\x00\x0e\xa0\xcc\xac\x00\x0e\xa0\xd9\xb4\x00\x0e\xa0\xee\xb5\x00\x15\xa0\xc6\x06\x00\x01\x15\xa0\xcd\x0c\x00\x01\x15\xa0\xda\x14\x00\x01\x23\xa0\x42\xa0\xc3"\
+ "\x00"
+
+
+/*************************************************************
+*** A.3.1. SigComp Feedback Mechanism_2
+*/
+#define RFC4465_A_3_1__SigComp_Feedback_Mechanism_2\
+ "\xf8\x05\x03\x1c\x01\xa0\x41\xa0\x55\x17\x60\x01\x07\x0e\xa0\x4f\x0e\xa0\x42\xa4\x7f\x16\x0e\x0e\xa0\x42\xa4\xff\x15\xa0\x44\xa0\x7f\x01\x01\x0e\xa0\xc3\xa8\x01\x0e\xa0\xc5\xa6\x00\x0e\xa0\xcc\xac\x00\x0e\xa0\xd9\xb4\x00\x0e\xa0\xee\xb5\x00\x15\xa0\xc6\x06\x00\x01\x15\xa0\xcd\x0c\x00\x01\x15\xa0\xda\x14\x00\x01\x23\xa0\x42\xa0\xc3"\
+ "\x01"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_1
+*/
+#define RFC4465_A_3_2__State_Memory_Management_1\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x00"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_2
+*/
+#define RFC4465_A_3_2__State_Memory_Management_2\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x01"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_3
+*/
+#define RFC4465_A_3_2__State_Memory_Management_3\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x02"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_4
+*/
+#define RFC4465_A_3_2__State_Memory_Management_4\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x03"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_5
+*/
+#define RFC4465_A_3_2__State_Memory_Management_5\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x04"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_6
+*/
+#define RFC4465_A_3_2__State_Memory_Management_6\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x05"
+
+
+/*************************************************************
+*** A.3.2. State Memory Management_7
+*/
+#define RFC4465_A_3_2__State_Memory_Management_7\
+ "\xf8\x1b\xa1\x0f\x86\x02\x89\xa2\x04\x1c\x01\xa0\x47\xf9\x17\x63\x05\x08\xa0\x68\xa0\x70\x17\x63\x03\x07\x34\xa0\x56\x08\x23\x06\x06\x23\xa2\x04\x0e\xa0\x44\x63\x06\x23\x06\x12\x62\x02\xa0\x4a\x17\x62\x63\x08\xa0\x58\x9f\xd2\x0e\xa0\x48\x65\x08\x24\x88\x20\x64\x89\x00\x06\x65\x06\x22\x02\x16\xe3\x1f\xa2\x16\x06\x00\x00\x00\x00\x1f\xa2\x1c\x06\x00\x00\x00\x00\x1f\xa2\x22\x06\x00\x00\x00\x00\x1f\xa2\x2e\x06\x00\x00\x00\x00\x16\x1e\x1f\xa2\x28\x06\x00\x00\x00\x00\x16\x14\x20\x8b\x89\x00\x06\x00\x16\x0c\x1f\xa2\x34\x06\x00\x00\x00\x00\x16\x02\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x65\x73\x74\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x03\x00\x02\x00\x01\x00\x00\x8e\xea\x4b\x43\xa7\x87\xf9\x01\x0e\xef\x56\x7b\x23\x9a\x34\x6b\x15\xa6\xb4\x0f\xc0\xe4\x4d\x2c\xd4\xa2\x21\x47\xe6\x0a\xef\xf2\xbc\x0f\xb6\xaf"\
+ "\x06"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_1
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_1\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x00"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_2
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_2\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x01"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_3
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_3\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x02"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_4
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_4\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x03"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_5
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_5\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x04"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_6
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_6\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x05"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_7
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_7\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x06"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_8
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_8\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x07"
+
+
+/*************************************************************
+*** A.3.3. Multiple Compartments_9
+*/
+#define RFC4465_A_3_3__Multiple_Compartments_9\
+ "\xf8\x1b\x11\x0f\x86\x02\x89\xa2\x07\x1c\x01\xa0\x45\xf9\x17\x62\x03\x0d\x3d\x06\x17\x62\x05\x37\x86\xa0\x68\x06\x22\x89\x20\xa1\xc0\x62\x00\x06\x00\x06\x22\x03\x20\xa1\xc0\x62\x00\x06\x00\x07\x22\xa2\x02\x0a\x22\x03\x06\x22\xa2\x03\x20\xa1\xc0\x62\x00\x06\x00\x20\xa1\xc0\xa2\x06\x00\x06\x62\x16\x2b\x20\xa7\xc0\x20\x00\x06\x00\x16\x22\x1f\xa2\x13\x06\x00\x00\x00\x00\x1f\xa2\x19\x06\x00\x00\x00\x00\x1f\xa2\x25\x06\x00\x00\x00\x00\x1f\xa2\x2b\x06\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x17\x62\x07\x06\x10\x1a\x1f\xa2\x07\x06\x00\x00\x00\x00\x16\xea\x1f\xa2\x0d\x06\x00\x00\x00\x00\x16\xe0\x1f\xa2\x1f\x06\x00\x00\x00\x00\x16\x9f\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\xac\xa6\x0b\x8e\xb2\x83\x9d\xbf\xaf\xc6\x3d\xd2\x34\xc5\xd9\x1d\x53\x61\xbd\xd6\xba\x2a\xc6\x5a\x47\xc2\x18\x14\xee\x07\xc2\x75\x94\x1d\xd7\xa1\x48\x87\x9c\x8d\xe9\x0e"\
+ "\x08"
+
+
+/*************************************************************
+*** A.3.4. Accessing RFC 3485 State
+*/
+#define RFC4465_A_3_4__Accessing_RFC_3485_State\
+ "\xf8\x03\xa1\x1f\xa0\xa6\x14\xac\xfe\x01\x20\x00\x1f\xa0\xa6\x06\xac\xff\x01\x21\x00\x1f\xa0\xa6\x0c\xad\x00\x01\x22\x00\x22\x20\x03\x23\x00\x00\x00\x00\x00\x00\x00\xfb\xe5\x07\xdf\xe5\xe6\xaa\x5a\xf2\xab\xb9\x14\xce\xaa\x05\xf9\x9c\xe6\x1b\xa5"\
+ ""
+
+
+/*************************************************************
+*** A.3.5. Bytecode State Creation_1
+*/
+#define RFC4465_A_3_5__Bytecode_State_Creation_1\
+ "\xf8\x04\x61\x12\xa0\xbe\x08\x1e\x20\x08\x1e\x21\x06\x0a\x0e\x23\xbe\x03\x12\xa0\xbe\x08\xa0\x50\x20\x08\xa0\x50\xa0\x53\x14\x0a\x20\x08\xa0\x50\xa0\x53\x0c\x0a\x16\x06\x00\x4f\x4b\x31\x1c\x01\xa0\xb3\xfc\x22\xa0\xa8\x03\x23\x00\x00\x0d\xa0\xa8\xa0\xab\x06\x0a\x4f\x4b\x32\x22\xa0\x50\x03\x23\x02"\
+ ""
+
+
+/*************************************************************
+*** A.3.5. Bytecode State Creation_2
+*/
+#define RFC4465_A_3_5__Bytecode_State_Creation_2\
+ "\xf9\x05\xb8\x8c\xe7\x2c\x91\x03"\
+ ""
+
+
+/*************************************************************
+*** A.3.5. Bytecode State Creation_3
+*/
+#define RFC4465_A_3_5__Bytecode_State_Creation_3\
+ "\xfb\x24\x63\xcd\xff\x5c\xf8\xc7\x6d\xf6\xa2\x89\xff"\
+ ""
+
+
+/*************************************************************
+*** A.3.5. Bytecode State Creation_4
+*/
+#define RFC4465_A_3_5__Bytecode_State_Creation_4\
+ "\xf9\x5b\x4b\x43\xd5\x67\x83"\
+ ""
+
+
+/*************************************************************
+*** A.3.5. Bytecode State Creation_5
+*/
+#define RFC4465_A_3_5__Bytecode_State_Creation_5\
+ "\xf9\xde\x81\x26\x11\x99\x1f"\
+ ""
+
+
+#endif /* _RFC4465_TORTURE_TESTS_H_ */ \ No newline at end of file
diff --git a/tinySIGCOMP/test/stdafx.c b/tinySIGCOMP/test/stdafx.c
new file mode 100644
index 0000000..59df1b5
--- /dev/null
+++ b/tinySIGCOMP/test/stdafx.c
@@ -0,0 +1,26 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/tinySIGCOMP/test/stdafx.h b/tinySIGCOMP/test/stdafx.h
new file mode 100644
index 0000000..541dbbb
--- /dev/null
+++ b/tinySIGCOMP/test/stdafx.h
@@ -0,0 +1,39 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+#ifndef TEST_TINYSIGCOMP_STDAFX_H
+#define TEST_TINYSIGCOMP_STDAFX_H
+
+#include "targetver.h"
+
+#include <stdio.h>
+#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
+# include <tchar.h>
+#endif
+
+#include <string.h>
+
+
+//#define TINYSAK_IMPORTS
+//#define TINYSIGCOMP_IMPORTS
+
+#endif /* TEST_TINYSIGCOMP_STDAFX_H */ \ No newline at end of file
diff --git a/tinySIGCOMP/test/targetver.h b/tinySIGCOMP/test/targetver.h
new file mode 100644
index 0000000..0079b39
--- /dev/null
+++ b/tinySIGCOMP/test/targetver.h
@@ -0,0 +1,18 @@
+#ifndef _TEST_TINYSIGCOMP_VER
+#define _TEST_TINYSIGCOMP_VER
+
+#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
+// The following macros define the minimum required platform. The minimum required platform
+// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
+// your application. The macros work by enabling all features available on platform versions up to and
+// including the version specified.
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
+#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#endif
+
+#endif /*_TEST_TINYSIGCOMP_VER*/ \ No newline at end of file
diff --git a/tinySIGCOMP/test/test.c b/tinySIGCOMP/test/test.c
new file mode 100644
index 0000000..86da93a
--- /dev/null
+++ b/tinySIGCOMP/test/test.c
@@ -0,0 +1,1160 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+#include "stdafx.h"
+#include "tcomp_manager.h" /* TinySIGCOMP API functions. */
+
+#include "tsk_debug.h"
+
+#define TORTURES 0
+
+#if TORTURES
+
+#define STREAM_ID 1983
+#define COMPARTMENT_ID "urn:uuid:2e5fdc76-00be-4314-8202-1116fa82a473"
+#define OUTPUT_BUFFER_SIZE 2000
+#define DECOMPRESSION_MEMORY_SIZE 65530
+
+#define RUN_TEST_LOOP 1
+
+#define RUN_TEST_ALL 1
+#define RUN_TEST_NO 68
+
+#include "rfc4465_torture_tests.h"
+
+struct_torture_test tests[] =
+{
+ { //*** 0***
+ "A.1.1. Bit Manipulation",
+ RFC4465_A_1_1__Bit_Manipulation,
+ 170,
+ "\x01\x50\x00\x00\xfe\xbf\x00\x00",
+ 22
+ }
+ ,
+ { //*** 1***
+ "A.1.2. Arithmetic",
+ RFC4465_A_1_2__Arithmetic,
+ 174,
+ "\x00\x00\x00\x00\x00\x00\x00\x04",
+ 25
+ }
+ ,
+ {
+ //*** 2***
+ "A.1.3. Sorting",
+ RFC4465_A_1_3__Sorting,
+ 223,
+ "\x46\x6f\x72\x64\x2c\x20\x79\x6f\x75\x27\x72\x65\x20\x74\x75\x72\x6e\x69\x6e\x67"
+ "\x20\x69\x6e\x74\x6f\x20\x61\x20\x70\x65\x6e\x67\x75\x69\x6e\x2e\x20\x53\x74\x6f"
+ "\x70\x20\x69\x74\x2e",
+ 371
+ }
+ ,
+ {
+ //*** 3**
+ "A.1.4. SHA-1",
+ RFC4465_A_1_4__SHA1,
+ 138,
+ "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d"
+ "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1"
+ "\x12\xff\x34\x7b\x4f\x27\xd6\x9e\x1f\x32\x8e\x6f\x4b\x55\x73\xe3\x66\x6e\x12\x2f"
+ "\x4f\x46\x04\x52\xeb\xb5\x63\x93\x4f\x46\x04\x52\xeb\xb5\x63\x93\x4f\x46\x04\x52",
+ 17176
+ }
+ ,
+ {
+ //*** 4**
+ "A.1.5. LOAD and MULTILOAD",
+ RFC4465_A_1_5__LOAD_and_MULTILOAD,
+ 58,
+ "\x00\x84\x00\x84\x00\x86\x00\x86\x00\x2a\x00\x80\x00\x2a\x00\x2a",
+ 36
+ }
+ ,
+ {
+ //** 5**
+ "A.1.6. COPY",
+ RFC4465_A_1_6__COPY,
+ 60,
+ "\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40"
+ "\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x40\x41\x41\x41\x41\x41\x41\x41\x41"
+ "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
+ "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
+ "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"
+ "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x55\x41"
+ "\x42\x43\x44\x43\x44",
+ 365
+ }
+ ,
+ {
+ //** 6**
+ "A.1.7. COPY-LITERAL and COPY-OFFSET",
+ RFC4465_A_1_7__COPY_LITERAL_and_COPY_OFFSET,
+ 100,
+ "\x41\x41\x41\x41\x00\x61\x41\x41\x41\x41\x49\x4a\x41\x42\x43\x44\x49\x4a\x41\x42"
+ "\x00\x4a\x00\x4e\x47\x48\x48\x45\x46\x47\x47\x48\x45\x46",
+ 216
+ }
+ ,
+ {
+ //** 7**
+ "A.1.8. MEMSET",
+ RFC4465_A_1_8__MEMSET,
+ 27,
+ "\x80\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9\xb8\xc7\xd6\xe5\xf4\x03\x12",
+ 166
+ }
+ ,
+ {
+ //** 8**
+ "A.1.9. CRC",
+ RFC4465_A_1_9__CRC,
+ 29,
+ "",
+ 95
+ }
+ ,
+ {
+ //** 9**
+ "A.1.10. INPUT-BITS",
+ RFC4465_A_1_10__INPUT_BITS,
+ 28,
+ "\x00\x00\x00\x02\x00\x02\x00\x13\x00\x00\x00\x03\x00\x1a\x00\x38",
+ 66
+ }
+ ,
+ {
+ //** 10**
+ "A.1.11. INPUT-HUFFMAN",
+ RFC4465_A_1_11__INPUT_HUFFMAN,
+ 39,
+ "\x00\x00\x00\x03\x00\x08\x04\xd7\x00\x02\x00\x03\x03\x99\x30\xfe",
+ 84
+ }
+ ,
+ {
+ //** 11**
+ "A.1.12. INPUT-BYTES",
+ RFC4465_A_1_12__INPUT_BYTES,
+ 72,
+ "\x00\x00\x93\x2e\x00\x01\xb1\x66\xd8\x6f\xb1\x00\x1a\x2b\x00\x03\x9a\x97\x34\xd8"
+ "\x00\x07\x00\x01\x33\x87\x4e\x00\x08\xdc\x96\x51\xb5\xdc\x96\x00\x59\x9d\x6a",
+ 130
+ }
+ ,
+ {
+ //** 12**
+ "A.1.13. Stack Manipulation",
+ RFC4465_A_1_13__Stack_Manipulation,
+ 324,
+ "",
+ 40
+ }
+ ,
+ {
+ //** 13**
+ "A.1.14. Program Flow",
+ RFC4465_A_1_14__Program_Flow,
+ 66,
+ "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x05\x05\x06\x07\x07\x07\x08\x08\x08\x09\x09",
+ 131
+ }
+ ,
+ {
+ //** 14**
+ "A.1.15. State Creation_1",
+ RFC4465_A_1_15__State_Creation_1,
+ 152,
+ "",
+ 23
+ }
+ ,
+ {
+ //** 15**
+ "A.1.15. State Creation_2",
+ RFC4465_A_1_15__State_Creation_2,
+ 152,
+ "",
+ 14
+ }
+ ,
+ {
+ //** 16**
+ "A.1.15. State Creation_3",
+ RFC4465_A_1_15__State_Creation_3,
+ 152,
+ "",
+ 24
+ }
+ ,
+ {
+ //** 17**
+ "A.1.15. State Creation_4", // FAIL
+ RFC4465_A_1_15__State_Creation_4,
+ 153,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 18**
+ "A.1.15. State Creation_5", // FAIL
+ RFC4465_A_1_15__State_Creation_5,
+ 153,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 19**
+ "A.1.15. State Creation_6",
+ RFC4465_A_1_15__State_Creation_6,
+ 153,
+ "",
+ 23
+ }
+ ,
+ {
+ //** 20**
+ "A.1.15. State Creation_7",
+ RFC4465_A_1_15__State_Creation_7,
+ 152,
+ "",
+ 34
+ }
+ ,
+ {
+ //** 21**
+ "A.1.15. State Creation_8",
+ RFC4465_A_1_15__State_Creation_8,
+ 153,
+ "",
+ 46
+ }
+ ,
+ {
+ //** 22**
+ "A.1.15. State Creation_9",
+ RFC4465_A_1_15__State_Creation_9,
+ 153,
+ "",
+ 47
+ }
+ ,
+ {
+ //** 23**
+ "A.1.15. State Creation_10",
+ RFC4465_A_1_15__State_Creation_10,
+ 153,
+ "",
+ 60
+ }
+ ,
+ {
+ //** 24**
+ "A.1.16. STATE-ACCESS {Set up bytecode}",
+ RFC4465_A_1_16__STATE_ACCESS__SETUP,
+ 403,
+ "",
+ 17
+ }
+ ,
+ {
+ //** 25**
+ "A.1.16. STATE-ACCESS_1",
+ RFC4465_A_1_16__STATE_ACCESS_1,
+ 408,
+ "\x74\x65\x73\x74",
+ 26
+ }
+ ,
+ {
+ //** 26**
+ "A.1.16. STATE-ACCESS_2",
+ RFC4465_A_1_16__STATE_ACCESS_2,
+ 408,
+ "\x74\x65\x73\x74",
+ 15
+ }
+ ,
+ {
+ //** 27**
+ "A.1.16. STATE-ACCESS_3",
+ RFC4465_A_1_16__STATE_ACCESS_3,
+ 408,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 28**
+ "A.1.16. STATE-ACCESS_4",
+ RFC4465_A_1_16__STATE_ACCESS_4,
+ 408,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 29**
+ "A.1.16. STATE-ACCESS_5",
+ RFC4465_A_1_16__STATE_ACCESS_5,
+ 408,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 30**
+ "A.2.1. Useful Values_1",
+ RFC4465_A_2_1__Useful_Values_1,
+ 99,
+ "",
+ 968
+ }
+ ,
+ {
+ //** 31**
+ "A.2.1. Useful Values_2",
+ RFC4465_A_2_1__Useful_Values_2,
+ 9,
+ "",
+ (16 * 1080)
+ }
+ ,
+ {
+ //** 32**
+ "A.2.1. Useful Values_3",
+ RFC4465_A_2_1__Useful_Values_3,
+ 9,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 33**
+ "A.2.1. Useful Values_4",
+ RFC4465_A_2_1__Useful_Values_4,
+ 9,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 34**
+ "A.2.2. Cycles Checking",
+ RFC4465_A_2_2__Cycles_Checking,
+ 29,
+ "",
+ 0
+ }
+ ,
+ {
+ //** 35**
+ "A.2.3. Message-based Transport_1",
+ RFC4465_A_2_3_Message_based_Transport_1,
+ 1,
+ "MESSAGE_TOO_SHORT",
+ 0
+ }
+ ,
+ {
+ //** 36**
+ "A.2.3. Message-based Transport_2",
+ RFC4465_A_2_3_Message_based_Transport_2,
+ 2,
+ "MESSAGE_TOO_SHORT",
+ 0
+ }
+ ,
+ {
+ //** 37**
+ "A.2.3. Message-based Transport_3",
+ RFC4465_A_2_3_Message_based_Transport_3,
+ 17,
+ "decompression_memory_size",
+ 5
+ }
+ ,
+ {
+ //** 38**
+ "A.2.3. Message-based Transport_4",
+ RFC4465_A_2_3_Message_based_Transport_4,
+ 17,
+ "MESSAGE_TOO_SHORT",
+ 0
+ }
+ ,
+ {
+ //** 39**
+ "A.2.3. Message-based Transport_5",
+ RFC4465_A_2_3_Message_based_Transport_5,
+ 17,
+ "INVALID_CODE_LOCATION",
+ 0
+ }
+ ,
+ {
+ //** 40**
+ "A.2.3. Message-based Transport_6",
+ RFC4465_A_2_3_Message_based_Transport_6,
+ 17,
+ "decompression_memory_size",
+ 5
+ }
+ ,
+ {
+ //** 41**
+ "A.2.4. Stream-based Transport_1",
+ RFC4465_A_2_4_Stream_based_Transport_1,
+ 67,
+ "decompression_memory_size",
+ 11,
+ 1
+
+ }
+ ,
+ {
+ //** 42**
+ "A.2.4. Stream-based Transport_2",
+ RFC4465_A_2_4_Stream_based_Transport_2,
+ 67,
+ "decompression_memory_size",
+ 11,
+ 1,
+ 0
+
+ }
+ ,
+ {
+ //** 43**
+ "A.2.4. Stream-based Transport_3",
+ RFC4465_A_2_4_Stream_based_Transport_3,
+ 3,
+ "MESSAGE_TOO_SHORT",
+ 0,
+ 1,
+ 1
+ }
+ ,
+ {
+ //** 44**
+ "A.2.4. Stream-based Transport_4",
+ RFC4465_A_2_4_Stream_based_Transport_4,
+ 4,
+ "MESSAGE_TOO_SHORT",
+ 0,
+ 1,
+ 1
+ }
+ ,
+ {
+ //** 45**
+ "A.2.4. Stream-based Transport_5",
+ RFC4465_A_2_4_Stream_based_Transport_5,
+ 30,
+ "MESSAGE_TOO_SHORT",
+ 0,
+ 1,
+ 0
+ }
+ ,
+ {
+ //** 46**
+ "A.2.4. Stream-based Transport_6",
+ RFC4465_A_2_4_Stream_based_Transport_6,
+ 29,
+ "INVALID_CODE_LOCATION",
+ 0,
+ 1,
+ 0
+ }
+ ,
+ {
+ //** 47**
+ "A.2.5. Input Past the End of a Message_1",
+ RFC4465_A_2_5__Input_Past_the_End_of_a_Message_1,
+ 59,
+ "\x68\x69\x21",
+ 23,
+ 0,
+ 0
+ }
+ ,
+ {
+ //** 48**
+ "A.2.5. Input Past the End of a Message_2",
+ RFC4465_A_2_5__Input_Past_the_End_of_a_Message_2,
+ 58,
+ "USER_REQUESTED",
+ 0,
+ 0,
+ 1
+ }
+ ,
+ {
+ //** 49**
+ "A.3.1. SigComp Feedback Mechanism_1",
+ RFC4465_A_3_1__SigComp_Feedback_Mechanism_1,
+ 84,
+ "",
+ 52,
+ 0,
+ 0
+ }
+ ,
+ {
+ //** 50**
+ "A.3.1. SigComp Feedback Mechanism_2",
+ RFC4465_A_3_1__SigComp_Feedback_Mechanism_2,
+ 84,
+ "",
+ 179
+ }
+ ,
+ {
+ //** 51**
+ "A.3.2. State Memory Management_1",
+ RFC4465_A_3_2__State_Memory_Management_1,
+ 446,
+ "",
+ 811
+ }
+ ,
+ {
+ //** 52**
+ "A.3.2. State Memory Management_2",
+ RFC4465_A_3_2__State_Memory_Management_2,
+ 446,
+ "",
+ 2603
+ }
+ ,
+ {
+ //** 53**
+ "A.3.2. State Memory Management_3",
+ RFC4465_A_3_2__State_Memory_Management_3,
+ 446,
+ "",
+ 811
+ }
+ ,
+ {
+ //** 54**
+ "A.3.2. State Memory Management_4",
+ RFC4465_A_3_2__State_Memory_Management_4,
+ 446,
+ "",
+ 1805
+ }
+ ,
+ {
+ //** 55**
+ "A.3.2. State Memory Management_5",
+ RFC4465_A_3_2__State_Memory_Management_5,
+ 446,
+ "STATE_NOT_FOUND",
+ 0
+ }
+ ,
+ {
+ //** 56**
+ "A.3.2. State Memory Management_6",
+ RFC4465_A_3_2__State_Memory_Management_6,
+ 446,
+ "",
+ 2057
+ }
+ ,
+ {
+ //** 57**
+ "A.3.2. State Memory Management_7",
+ RFC4465_A_3_2__State_Memory_Management_7,
+ 446,
+ "",
+ 1993
+ }
+ ,
+ {
+ //** 58**
+ "A.3.3. Multiple Compartments_1",
+ RFC4465_A_3_3__Multiple_Compartments_1,
+ 437,
+ "",
+ 1809
+ }
+ ,
+ {
+ //** 59**
+ "A.3.3. Multiple Compartments_2",
+ RFC4465_A_3_3__Multiple_Compartments_2,
+ 437,
+ "",
+ 1809
+ }
+ ,
+ {
+ //** 60**
+ "A.3.3. Multiple Compartments_3",
+ RFC4465_A_3_3__Multiple_Compartments_3,
+ 437,
+ "",
+ 1809
+ }
+ ,
+ {
+ //** 61**
+ "A.3.3. Multiple Compartments_4",
+ RFC4465_A_3_3__Multiple_Compartments_4,
+ 437,
+ "",
+ 1993
+ }
+ ,
+ {
+ //** 62**
+ "A.3.3. Multiple Compartments_5",
+ RFC4465_A_3_3__Multiple_Compartments_5,
+ 437,
+ "",
+ 1994
+ }
+ ,
+ {
+ //** 63**
+ "A.3.3. Multiple Compartments_6",
+ RFC4465_A_3_3__Multiple_Compartments_6,
+ 437,
+ "",
+ 1804
+ }
+ ,
+ {
+ //** 64**
+ "A.3.3. Multiple Compartments_7",
+ RFC4465_A_3_3__Multiple_Compartments_7,
+ 437,
+ "STATE_NOT_FOUND",
+ 0
+ }
+ ,
+ {
+ //** 65**
+ "A.3.3. Multiple Compartments_8",
+ RFC4465_A_3_3__Multiple_Compartments_8,
+ 437,
+ "STATE_NOT_FOUND",
+ 0
+ }
+ ,
+ {
+ //** 66**
+ "A.3.3. Multiple Compartments_9",
+ RFC4465_A_3_3__Multiple_Compartments_9,
+ 437,
+ "STATE_NOT_FOUND",
+ 0
+ }
+ ,
+ {
+ //** 67**
+ "A.3.4. Accessing RFC 3485 State",
+ RFC4465_A_3_4__Accessing_RFC_3485_State,
+ 61,
+ "\x53\x49\x50",
+ 11
+ }
+ ,
+ {
+ //** 68**
+ "A.3.5. Bytecode State Creation_1",
+ RFC4465_A_3_5__Bytecode_State_Creation_1,
+ 74,
+ "\x4f\x4b",
+ 66
+ }
+ ,
+ {
+ //** 69**
+ "A.3.5. Bytecode State Creation_2",
+ RFC4465_A_3_5__Bytecode_State_Creation_2,
+ 8,
+ "\x4f\x4b\x31",
+ 7
+ }
+ ,
+ {
+ //** 70**
+ "A.3.5. Bytecode State Creation_3",
+ RFC4465_A_3_5__Bytecode_State_Creation_3,
+ 13,
+ "\x4f\x4b\x32",
+ 5
+ }
+ ,
+ {
+ //** 71**
+ "A.3.5. Bytecode State Creation_4",
+ RFC4465_A_3_5__Bytecode_State_Creation_4,
+ 7,
+ "\x00\x00\x32",
+ 5
+ }
+ ,
+ {
+ //** 72**
+ "A.3.5. Bytecode State Creation_5",
+ RFC4465_A_3_5__Bytecode_State_Creation_5,
+ 7,
+ "STATE_NOT_FOUND",
+ 0,
+ 0,
+ 1
+ }
+};
+
+int startsWith(const char* buffer1, size_t size1, const char* buffer2, size_t size2)
+{
+ size_t i;
+
+ if(size1 < size2) return 0;
+
+ for(i = 0; i< size2; i++)
+ {
+ if(buffer1[i] != buffer2[i])
+ {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+#ifdef _WIN32_WCE
+int _tmain(int argc, _TCHAR* argv[])
+#else
+int main()
+#endif
+{
+ size_t i, start, end;
+ size_t res_size = 0;
+ char buffer[OUTPUT_BUFFER_SIZE];
+ tcomp_manager_handle_t *manager = TCOMP_MANAGER_CREATE();
+ tcomp_result_t *result = TCOMP_RESULT_CREATE();
+
+ /* Add SIP dictionary. */
+ tcomp_manager_addSipSdpDictionary(manager);
+
+ /* Add Presence dictionary. */
+ tcomp_manager_addPresenceDictionary(manager);
+
+ /* Set decompression size. */
+ tcomp_manager_setDecompression_Memory_Size(manager, DECOMPRESSION_MEMORY_SIZE);
+
+#if RUN_TEST_LOOP
+ for(;;)
+#endif
+ {
+#if RUN_TEST_ALL
+ start = 0, end = 72;
+#else
+ start = RUN_TEST_NO, end = RUN_TEST_NO + 1;
+#endif
+
+ for(i=start; i<end; i++)
+ {
+ printf("=== Testing %s ===\n\n", tests[i].section_name);
+
+ if(tests[i].stream)
+ {
+ tcomp_result_setOutputTCPBuffer(result, buffer, OUTPUT_BUFFER_SIZE, STREAM_ID);
+ }
+ else
+ {
+ tcomp_result_setOutputUDPBuffer(result, buffer, OUTPUT_BUFFER_SIZE);
+ }
+
+ /* Performs decompression */
+ res_size = tcomp_manager_decompress(manager, tests[i].bytecode, tests[i].bytecode_size, result);
+ if(result->isNack)
+ {
+ printf("\n==WE GOT A NACK\n\n");
+ //sendto(tcomp_buffer_getBuffer(result->nack_info), tcomp_buffer_getSize(result->nack_info));
+ }
+ else
+ {
+ tcomp_result_setCompartmentId(result, COMPARTMENT_ID, strlen(COMPARTMENT_ID));
+ tcomp_manager_provideCompartmentId(manager, result);
+ }
+ /* == Stream
+ */
+ if(tests[i].stream && (res_size || result->isNack))
+ {
+ for(;;)
+ {
+ res_size = tcomp_manager_getNextStreamMessage(manager, result);
+ if(!res_size && !result->isNack)
+ {
+ break;
+ }
+ else if(res_size)
+ {
+ tcomp_result_setCompartmentId(result, COMPARTMENT_ID, strlen(COMPARTMENT_ID));
+ tcomp_manager_provideCompartmentId(manager, result);
+ }
+ else
+ {
+ printf("\n==WE GOT A NACK\n\n");
+ //sendto(tcomp_buffer_getBuffer(result->nack_info), tcomp_buffer_getSize(result->nack_info));
+ }
+ }
+ }
+
+ printf("xoutpout: %s\n", startsWith(buffer, OUTPUT_BUFFER_SIZE, tests[i].xoutput, strlen(tests[i].xoutput)) ? "YES" : "NO");
+ printf("xcycles: %s\n", (result->consumed_cycles == tests[i].xcycles) ? "YES" : "NO");
+ printf("output size: %u\n", res_size);
+ }
+
+ }/* LOOP */
+
+ /* Free previously allocated resources. */
+ TCOMP_RESULT_SAFE_FREE(result);
+ TCOMP_MANAGER_SAFE_FREE(manager);
+
+ return 0;
+}
+
+
+#else /* !TORTURES */
+
+#define COMPARTMENT_ID1 "urn:uuid:2e5fdc76-00be-4314-8202-1116fa82a474" // My first compartment id
+#define COMPARTMENT_ID2 "urn:uuid:2e5fdc76-00be-4314-8202-1116fa82a475" // My second compartment id
+
+#define IS_STREAM 0 // Using reliable transport
+#define STREAM_ID 678 // stream identifier
+
+#define MAX_BUFFER_SIZE 0xfff0
+
+#define LOOP_COUNT 100
+
+#define DECOMP_NACK_4_TEST 0
+
+// messages to use for tests
+const char* messages[] =
+{
+ //{
+ "REGISTER sip:ims-network.com SIP/2.0\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;rport;branch=z9hG4bK1245420841406\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=29358\r\n"
+ "To: <sip:mamadou@ims-network.com>\r\n"
+ "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n"
+ "CSeq: 201 REGISTER\r\n"
+ "Max-Forwards: 70\r\n"
+ "Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER\r\n"
+ "Contact: <sip:mamadou@[::]:1988;comp=sigcomp;transport=udp>;expires=600000;+deviceID=\"3ca50bcb-7a67-44f1-afd0-994a55f930f4\";mobility=\"fixed\";+g.3gpp.cs-voice;+g.3gpp.app%5fref=\"urn%3Aurnxxx%3A3gpp-application.ims.iari.gsmais\";+g.oma.sip-im.large-message;+g.oma.sip-im\r\n"
+ "User-Agent: IM-client/OMA1.0 doubango/v4.0.1390.0\r\n"
+ "Require: pref\r\n"
+ "P-Preferred-Identity: <sip:mamadou@ims-network.com>\r\n"
+ "Supported: path\r\n"
+ "P-Access-Network-Info: 3GPP-UTRAN-TDD;utran-cell-id-3gpp=00000000\r\n"
+ "Privacy: none\r\n"
+ "Supported: timer\r\n"
+ "Content-Length: 0\r\n"
+ "\r\n"
+ //}
+ ,
+ //{
+ "SIP/2.0 401 Unauthorized - Challenging the UE\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;received=2001:5C0:1502:1800:1D41:BF77:F1BF:BB49;rport=1988;branch=z9hG4bK1245420841406\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=29358\r\n"
+ "To: <sip:mamadou@ims-network.com>;tag=3241f316c9eb68efd2c34668c4fbf834-eaa0\r\n"
+ "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n"
+ "CSeq: 201 REGISTER\r\n"
+ "Path: <sip:term@pcscf.ims-network.com:4060;lr>\r\n"
+ "Service-Route: <sip:orig@scscf.ims-network.com:6060;lr>"
+ "Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, INFO\r\n"
+ "Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))\r\n"
+ "Content-Length: 0\r\n"
+ "Warning: 392 2001:5C0:1502:1800:0:0:0:226:6060 \"Noisy feedback tells: pid=24454 req_src_ip=2001:5C0:1502:1800:0:0:0:226 req_src_port=5060 in_uri=sip:scscf.ims-network.com:6060 out_uri=sip:scscf.ims-network.com:6060 via_cnt==3\"\r\n"
+ "WWW-Authenticate: Digest realm=\"ims-network.com\", nonce=\"xFBhTyFaQ0/lBgboH2ZqDe3BDmFXDwAA2Peq/bxtLQs=\", algorithm=AKAv1-MD5, qop=\"auth,auth-int\"\r\n"
+ "\r\n"
+
+ //}
+ ,
+ //{
+ "REGISTER sip:ims-network.com SIP/2.0\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;rport;branch=z9hG4bK1245420841407\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=29358\r\n"
+ "To: <sip:mamadou@ims-network.com>\r\n"
+ "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n"
+ "CSeq: 202 REGISTER\r\n"
+ "Max-Forwards: 70\r\n"
+ "Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER\r\n"
+ "Contact: <sip:mamadou@[::]:1988;comp=sigcomp;transport=udp>;expires=600000;+deviceID=\"3ca50bcb-7a67-44f1-afd0-994a55f930f4\";mobility=\"fixed\";+g.3gpp.cs-voice;+g.3gpp.app%5fref=\"urn%3Aurnxxx%3A3gpp-application.ims.iari.gsmais\";+g.oma.sip-im.large-message;+g.oma.sip-im\r\n"
+ "User-Agent: IM-client/OMA1.0 doubango/v4.0.1390.0\r\n"
+ "Authorization: Digest algorithm=AKAv1-MD5,username=\"mamadou@ims-network.com\",realm=\"ims-network.com\",nonce=\"xFBhTyFaQ0/lBgboH2ZqDe3BDmFXDwAA2Peq/bxtLQs=\",uri=\"sip:ims-network.com\",response=\"c499a6b49693d5b29c431786cff32ca4\",qop=auth-int,cnonce=\"9fcc19edace2d1beaa6122b86dd11256\",nc=00000001\r\n"
+ "Require: pref\r\n"
+ "P-Preferred-Identity: <sip:mamadou@ims-network.com>\r\n"
+ "Supported: path\r\n"
+ "P-Access-Network-Info: 3GPP-UTRAN-TDD;utran-cell-id-3gpp=00000000\r\n"
+ "Privacy: none\r\n"
+ "Supported: timer\r\n"
+ "Content-Length: 0\r\n"
+ "\r\n"
+ //}
+ ,
+ //{
+ "SIP/2.0 200 OK - SAR succesful and registrar saved\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;received=2001:5C0:1502:1800:1D41:BF77:F1BF:BB49;rport=1988;branch=z9hG4bK1245420841407\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=29358\r\n"
+ "To: <sip:mamadou@ims-network.com>;tag=3241f316c9eb68efd2c34668c4fbf834-1b36\r\n"
+ "Call-ID: M-fa53180346f7f55ceb8d8670f9223dbb\r\n"
+ "CSeq: 202 REGISTER\r\n"
+ "P-Associated-URI: <sip:mamadou@ims-network.com>\r\n"
+ "Contact: <sip:mamadou@[::]:1988;comp=sigcomp;transport=udp>;expires=600000\r\n"
+ "Path: <sip:term@pcscf.ims-network.com:4060;lr>\r\n"
+ "Service-Route: <sip:orig@scscf.ims-network.com:6060;lr>"
+ "Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, INFO\r\n"
+ "P-Charging-Function-Addresses: ccf=pri_ccf_address\r\n"
+ "Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))\r\n"
+ "Content-Length: 0\r\n"
+ "Warning: 392 2001:5C0:1502:1800:0:0:0:226:6060 \"Noisy feedback tells: pid=24452 req_src_ip=2001:5C0:1502:1800:0:0:0:226 req_src_port=5060 in_uri=sip:scscf.ims-network.com:6060 out_uri=sip:scscf.ims-network.com:6060 via_cnt==3\"\r\n"
+ "\r\n"
+ //}
+ ,
+ //{
+ "SUBSCRIBE sip:mamadou@ims-network.com SIP/2.0\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;rport;branch=z9hG4bK1245420841408\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=5705\r\n"
+ "To: <sip:mamadou@ims-network.com>\r\n"
+ "Call-ID: M-dd6e227ce416f853ca7bca49ad5b676d\r\n"
+ "CSeq: 301 SUBSCRIBE\r\n"
+ "Max-Forwards: 70\r\n"
+ "Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER\r\n"
+ "Contact: <sip:mamadou@[::]:1988;comp=sigcomp;transport=udp>;+g.oma.sip-im\r\n"
+ "User-Agent: IM-client/OMA1.0 doubango/v4.0.1390.0\r\n"
+ "Expires: 600000\r\n"
+ "Event: reg\r\n"
+ "Accept: application/reginfo+xml\r\n"
+ "Route: <sip:[2001:5c0:1502:1800::226]:4060;lr=true;transport=udp>,<sip:orig@scscf.ims-network.com:6060;lr>\r\n"
+ "P-Access-Network-Info: 3GPP-UTRAN-TDD;utran-cell-id-3gpp=00000000\r\n"
+ "Privacy: none\r\n"
+ "Supported: timer\r\n"
+ "Allow-Events: presence, presence.winfo, conference\r\n"
+ "Content-Length: 0\r\n"
+ "\r\n"
+ //}
+ ,
+ //{
+ "SIP/2.0 200 Subscription to REG saved\r\n"
+ "Record-Route: <sip:mo@pcscf.ims-network.com:4060;lr>\r\n"
+ "Via: SIP/2.0/UDP [::]:1988;comp=sigcomp;received=2001:5C0:1502:1800:1D41:BF77:F1BF:BB49;rport=1988;branch=z9hG4bK1245420841408\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=5705\r\n"
+ "To: <sip:mamadou@ims-network.com>;tag=3241f316c9eb68efd2c34668c4fbf834-5cce\r\n"
+ "Call-ID: M-dd6e227ce416f853ca7bca49ad5b676d\r\n"
+ "CSeq: 301 SUBSCRIBE\r\n"
+ "Expires: 600000\r\n"
+ "Contact: <sip:mamadou@ims-network.com;comp=sigcomp;>\r\n"
+ "Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))\r\n"
+ "Content-Length: 0\r\n"
+ "Warning: 392 2001:5C0:1502:1800:0:0:0:226:6060 \"Noisy feedback tells: pid=24454 req_src_ip=2001:5C0:1502:1800:0:0:0:226 req_src_port=4060 in_uri=sip:mamadou@ims-network.com out_uri=sip:mamadou@ims-network.com via_cnt==2\"\r\n"
+ "\r\n"
+ //}
+ ,
+ //{
+ "NOTIFY sip:mamadou@[::]:1988;transport=udp SIP/2.0\r\n"
+ "Via: SIP/2.0/UDP [2001:5C0:1502:1800:0:0:0:226]:4060;comp=sigcomp;branch=z9hG4bK2b3f.38818b91.0\r\n"
+ "Via: SIP/2.0/UDP [2001:5C0:1502:1800:0:0:0:226]:6060;received=2001:5C0:1502:1800:0:0:0:226;rport=6060;branch=z9hG4bK2b3f.6db77cf1.0\r\n"
+ "To: <sip:mamadou@ims-network.com>;tag=5705\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=3241f316c9eb68efd2c34668c4fbf834-5cce\r\n"
+ "CSeq: 10 NOTIFY\r\n"
+ "Call-ID: M-dd6e227ce416f853ca7bca49ad5b676d\r\n"
+ "Content-Length: 379\r\n"
+ "User-Agent: Sip EXpress router(2.1.0-dev1 OpenIMSCore (i386/linux))\r\n"
+ "Contact: <sip:mamadou@ims-network.com; comp=sigcomp;>\r\n"
+ "Event: reg\r\n"
+ "Max-Forwards: 16\r\n"
+ "Subscription-State: active;expires=600030\r\n"
+ "Content-Type: application/reginfo+xml\r\n"
+ "\r\n"
+ "<?xml version=\"1.0\"?>\r\n"
+ "<reginfo xmlns=\"urn:ietf:params:xml:ns:reginfo\" version=\"0\" state=\"full\">\r\n"
+ "<registration aor=\"sip:mamadou@ims-network.com\" id=\"0xb5d91fcc\" state=\"active\">\r\n"
+ "<contact id=\"0xb5d8fb98\" state=\"active\" event=\"registered\" expires=\"600000\">\r\n"
+ "<uri>sip:mamadou@[::]:1988;transport=udp</uri>\r\n"
+ "</contact>\r\n"
+ "</registration>\r\n"
+ "</reginfo>\r\n"
+ //}
+ ,
+ //{
+ "SIP/2.0 200 OK\r\n"
+ "Max-Forwards: 70\r\n"
+ "User-Agent: IM-client/OMA1.0 doubango/v4.0.1390.0\r\n"
+ "Via: SIP/2.0/UDP [2001:5C0:1502:1800:0:0:0:226]:4060;comp=sigcomp;branch=z9hG4bK2b3f.38818b91.0;received=2001:5c0:1502:1800::226\r\n"
+ "Via: SIP/2.0/UDP [2001:5C0:1502:1800:0:0:0:226]:6060;received=2001:5C0:1502:1800:0:0:0:226;rport=6060;branch=z9hG4bK2b3f.6db77cf1.0\r\n"
+ "To: <sip:mamadou@ims-network.com>;tag=5705\r\n"
+ "From: <sip:mamadou@ims-network.com>;tag=3241f316c9eb68efd2c34668c4fbf834-5cce\r\n"
+ "CSeq: 10 NOTIFY\r\n"
+ "Call-ID: M-dd6e227ce416f853ca7bca49ad5b676d\r\n"
+ "Content-Length: 0\r\n"
+ "\r\n"
+ //}
+};
+
+
+#ifdef _WIN32_WCE
+int _tmain(int argc, _TCHAR* argv[])
+#else
+int main()
+#endif
+{
+ int i = 0;
+ size_t outLen = 0;
+
+ tcomp_manager_handle_t *manager1 = tsk_null, *manager2 = tsk_null;
+ tcomp_result_t *result1 = tsk_null, *result2 = tsk_null;
+
+ /* temporary buffers --> will hold compression/decompression results */
+ char buff1[MAX_BUFFER_SIZE];
+ char buff2[MAX_BUFFER_SIZE];
+
+ /* Managers */
+ manager1 = tcomp_manager_create();
+ manager2 = tcomp_manager_create();
+
+ /* Add SIP/Presence dictionnaries */
+ tcomp_manager_addSipSdpDictionary(manager1);
+ tcomp_manager_addPresenceDictionary(manager1);
+ tcomp_manager_addSipSdpDictionary(manager2);
+ tcomp_manager_addPresenceDictionary(manager2);
+
+ /* Results --> it is recomanded to use one result struct for each manager */
+ result1 = tcomp_result_create();
+ result2 = tcomp_result_create();
+
+ /* Sets compartment Ids */
+ tcomp_result_setCompartmentId(result1, COMPARTMENT_ID1, strlen(COMPARTMENT_ID1));
+ tcomp_result_setCompartmentId(result2, COMPARTMENT_ID2, strlen(COMPARTMENT_ID2));
+
+ /* Set DMS and SMS */
+ tcomp_manager_setDecompression_Memory_Size(manager1, 32768);
+ tcomp_manager_setDecompression_Memory_Size(manager2, 32768);
+ tcomp_manager_setCycles_Per_Bit(manager1, 64);
+ tcomp_manager_setCycles_Per_Bit(manager2, 64);
+ tcomp_manager_setState_Memory_Size(manager1, 32768);
+ tcomp_manager_setState_Memory_Size(manager2, 32768);
+
+
+ for(i = 0; i< (8*LOOP_COUNT); i++)
+ {
+ memset(buff1, '\0', MAX_BUFFER_SIZE);
+ memset(buff2, '\0', MAX_BUFFER_SIZE);
+
+ //
+ // Compression using manager I
+ //
+ outLen = tcomp_manager_compress(manager1, COMPARTMENT_ID1, strlen(COMPARTMENT_ID1), messages[i%8], strlen(messages[i%8]), buff1, MAX_BUFFER_SIZE, IS_STREAM);
+ if(outLen)
+ {
+ //* TODO: sendto(SendSocket, buff1, outLen, 0, (SOCKADDR *) &SenderAddr, sizeof(SenderAddr));
+
+ /*
+ * Decompress the compressed message using manager II
+ */
+ tcomp_result_setOutputBuffer(result2, buff2, MAX_BUFFER_SIZE, IS_STREAM, STREAM_ID); // set the output buffer where to copy decompressed message
+ outLen = tcomp_manager_decompress(manager2, buff1, outLen, result2);
+ if(outLen) // OK
+ {
+ // buff2 contains the result and outLen is result length
+ TSK_DEBUG_INFO("%s\n\n", buff2);
+
+ // provide the compartment id --> save temp states
+ tcomp_manager_provideCompartmentId(manager2, result2);
+ }
+ else // NOK
+ {
+ TSK_DEBUG_ERROR("ERROR (1)");
+
+ //--assert(tcomp_result_getIsNack(result2));
+#if DECOMP_NACK_4_TEST
+ manager1->decompress(result2.getNackInfo()->getBuffer(), result2.getNackInfo()->getSize(), &result1);
+#endif
+ // Decompression failed --> handle NACK (done by remote party)
+ // NACK will be retourned only if SigCompVersion >= 2
+ // NACK must be sent to the remote party (SIP/IMS use-case) over the network
+ //* TODO: sendto(SendSocket, result2.getNackInfo()->getBuffer(), result2.getNackInfo()->getSize(), 0, (SOCKADDR *) &SenderAddr, sizeof(SenderAddr));
+ }
+ }
+ else
+ {
+ //std::cout<< "ERROR (2)" << std::endl;
+ //--assert(0); // MUST never happen
+ }
+
+
+ //
+ // Compression using manager II
+ //
+ outLen = tcomp_manager_compress(manager2, COMPARTMENT_ID2, strlen(COMPARTMENT_ID2), messages[i%8], strlen(messages[i%8]), buff2, MAX_BUFFER_SIZE, IS_STREAM);
+ if(outLen)
+ {
+ tcomp_result_setOutputBuffer(result1, buff1, MAX_BUFFER_SIZE, IS_STREAM, STREAM_ID); // set the output buffer where to copy decompressed message
+ outLen = tcomp_manager_decompress(manager1, buff2, outLen, result1);
+ if(outLen)
+ {
+ TSK_DEBUG_INFO("%s\n\n", buff1);
+ tcomp_manager_provideCompartmentId(manager1, result1);
+ }
+ else
+ {
+ TSK_DEBUG_ERROR("ERROR (3)");
+ //--assert(tcomp_result_getIsNack(result2));
+#if DECOMP_NACK_4_TEST
+ manager2->decompress(result1.getNackInfo()->getBuffer(), result1.getNackInfo()->getSize(), &result2);
+#endif
+ }
+ }
+ else
+ {
+ TSK_DEBUG_ERROR("ERROR (4)");
+ //--assert(0);
+ }
+ }
+
+ // Close compartments
+ tcomp_manager_closeCompartment(manager1, COMPARTMENT_ID1, strlen(COMPARTMENT_ID1));
+ tcomp_manager_closeCompartment(manager2, COMPARTMENT_ID2, strlen(COMPARTMENT_ID2));
+
+ // Delete Results
+ TSK_OBJECT_SAFE_FREE(result1);
+ TSK_OBJECT_SAFE_FREE(result2);
+
+ // Delete managers
+ TSK_OBJECT_SAFE_FREE(manager1);
+ TSK_OBJECT_SAFE_FREE(manager2);
+
+ getchar();
+}
+
+
+#endif /* TORTURES */
diff --git a/tinySIGCOMP/test/test.vcproj b/tinySIGCOMP/test/test.vcproj
new file mode 100644
index 0000000..fb3a588
--- /dev/null
+++ b/tinySIGCOMP/test/test.vcproj
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="test"
+ ProjectGUID="{0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}"
+ RootNamespace="test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(SolutionDir)\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinySIGCOMP.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(SolutionDir)\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\wince\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
+ PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);_CONSOLE"
+ MinimalRebuild="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinySIGCOMP.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ EntryPointSymbol="mainWCRTStartup"
+ ResourceOnlyDLL="false"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="&quot;$(SolutionDir)\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinySIGCOMP.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\stdafx.c"
+ >
+ </File>
+ <File
+ RelativePath=".\test.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="tortures"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\rfc4465_torture_tests.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tinySIGCOMP/tinySIGCOMP.sln b/tinySIGCOMP/tinySIGCOMP.sln
new file mode 100644
index 0000000..2019286
--- /dev/null
+++ b/tinySIGCOMP/tinySIGCOMP.sln
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySIGCOMP", "tinySIGCOMP.vcproj", "{76261DC8-25B3-43F4-9FB5-112C4AC0880E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ Release|Win32 = Release|Win32
+ Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Win32.Build.0 = Debug|Win32
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Win32.ActiveCfg = Release|Win32
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Win32.Build.0 = Release|Win32
+ {76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Debug|Win32.Build.0 = Debug|Win32
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Release|Win32.ActiveCfg = Release|Win32
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Release|Win32.Build.0 = Release|Win32
+ {0FC0B98C-E5BE-4AB4-A382-CBBEA5F09AFE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/tinySIGCOMP/tinySIGCOMP.tag b/tinySIGCOMP/tinySIGCOMP.tag
new file mode 100644
index 0000000..a108af7
--- /dev/null
+++ b/tinySIGCOMP/tinySIGCOMP.tag
@@ -0,0 +1,8730 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
+<tagfile>
+ <compound kind="page">
+ <name>index</name>
+ <title>tinySigComp API Overview</title>
+ <filename>index</filename>
+ </compound>
+ <compound kind="file">
+ <name>adler32.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>adler32_8c</filename>
+ <includes id="zlib_8h" name="zlib.h" local="yes" imported="no">zlib.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZLIB_INTERNAL</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a59d4d7ef4d73655c759211ec33a5d44f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>BASE</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a79bcfb6bde984f42d1124b068a509af7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NMAX</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a5de5d183f9a6a8d53316f743e1ca6dc2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DO1</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a465ff70ce96dfc2e84b0e87548b4ecb4</anchor>
+ <arglist>(buf, i)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DO2</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a3d7044f8ea7e75164fe5108048fd87eb</anchor>
+ <arglist>(buf, i)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DO4</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>aef9bafc8b3d89e98b6e26320f99b9e31</anchor>
+ <arglist>(buf, i)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DO8</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a9aafc447614bf5c4dc0d484aba9edb89</anchor>
+ <arglist>(buf, i)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DO16</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a6912c3e78e2b797f42f214d1b508aa0c</anchor>
+ <arglist>(buf)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MOD</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>aa1e26f19f1e6cf348e41511e7db90881</anchor>
+ <arglist>(a)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MOD4</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>ad7b4cfdfbc3e12bf00d27e3375d196d4</anchor>
+ <arglist>(a)</arglist>
+ </member>
+ <member kind="function">
+ <type>uLong ZEXPORT</type>
+ <name>adler32</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>a86607743a4b76949b24cf5cc2f01a40d</anchor>
+ <arglist>(uLong adler, const Bytef *buf, uInt len)</arglist>
+ </member>
+ <member kind="function">
+ <type>uLong ZEXPORT</type>
+ <name>adler32_combine</name>
+ <anchorfile>adler32_8c.html</anchorfile>
+ <anchor>af4a8b45f615e831c56b08da530870e59</anchor>
+ <arglist>(uLong adler1, uLong adler2, z_off_t len2)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>compress.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>compress_8c</filename>
+ <includes id="zlib_8h" name="zlib.h" local="yes" imported="no">zlib.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZLIB_INTERNAL</name>
+ <anchorfile>compress_8c.html</anchorfile>
+ <anchor>a59d4d7ef4d73655c759211ec33a5d44f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>compress2</name>
+ <anchorfile>compress_8c.html</anchorfile>
+ <anchor>aede7e438c033a969a1a40ba6b44f91f9</anchor>
+ <arglist>(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>compress</name>
+ <anchorfile>compress_8c.html</anchorfile>
+ <anchor>aef315743418d760a360e1be293d27cd1</anchor>
+ <arglist>(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)</arglist>
+ </member>
+ <member kind="function">
+ <type>uLong ZEXPORT</type>
+ <name>compressBound</name>
+ <anchorfile>compress_8c.html</anchorfile>
+ <anchor>a6bfd92b4426ff6008c841c2cc6f8fed3</anchor>
+ <arglist>(uLong sourceLen)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>deflate.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>deflate_8c</filename>
+ <includes id="deflate_8h" name="deflate.h" local="yes" imported="no">deflate.h</includes>
+ <class kind="struct">config_s</class>
+ <class kind="struct">static_tree_desc_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>NIL</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a263efce0e5cda1d387a1a43f94715445</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TOO_FAR</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>abeff1f2c9d15b7bddefe44a4360821b3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MIN_LOOKAHEAD</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>aab627bcc7d38e658a93d395c50180cb8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>EQUAL</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a214c717b2e51e1993a749ac99df7de58</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>UPDATE_HASH</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a44b283365d6ca10b7028e639c4a10e67</anchor>
+ <arglist>(s, h, c)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>INSERT_STRING</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a52d7ca8e864a07c0ba4a25d04588168b</anchor>
+ <arglist>(s, str, match_head)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>CLEAR_HASH</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>af328dc05f080f25747abf0edd75b6251</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>check_match</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a4041db99b23ca08963d3e5c284d837d6</anchor>
+ <arglist>(s, start, match, length)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>FLUSH_BLOCK_ONLY</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>afbe439cc64ad2722568bcf5eb12f06e0</anchor>
+ <arglist>(s, eof)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>FLUSH_BLOCK</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a60091ec200ac7904b7d4e34563a8f421</anchor>
+ <arglist>(s, eof)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>block_state compress_func</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a031e5ebda987f48c0ae613d46b8ac406</anchor>
+ <arglist>((deflate_state *s, int flush))</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct config_s</type>
+ <name>config</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a4473b5227787415097004fd39f55185e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumeration">
+ <name>block_state</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1048c01fb24f2195a6b9a2a7c12e9454</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>need_more</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1048c01fb24f2195a6b9a2a7c12e9454aa05dd4e7c2f875eee52a6568c244c1e4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>block_done</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1048c01fb24f2195a6b9a2a7c12e9454a94dca976f7dcfb0605e086068f09daa1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>finish_started</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1048c01fb24f2195a6b9a2a7c12e9454a5ff14f05c1ba145fc4da40fb50211140</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>finish_done</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1048c01fb24f2195a6b9a2a7c12e9454af1f0edbb0d9d8272a762de3b7be0b50c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>local void fill_window</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a39020875dba6274d4890d928ece7af4d</anchor>
+ <arglist>((deflate_state *s))</arglist>
+ </member>
+ <member kind="function">
+ <type>local block_state deflate_stored</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a8c5f4f16898c33f6c80e2c03a8f41f8a</anchor>
+ <arglist>((deflate_state *s, int flush))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void putShortMSB</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a7a385b4ab82557d539fe9a6059caf4d7</anchor>
+ <arglist>((deflate_state *s, uInt b))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void flush_pending</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a7c2e426a5f352f7e8c43ef7beec5138f</anchor>
+ <arglist>((z_streamp strm))</arglist>
+ </member>
+ <member kind="function">
+ <type>local int read_buf</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a89775aad02a4843022d7e83a3301239b</anchor>
+ <arglist>((z_streamp strm, Bytef *buf, unsigned size))</arglist>
+ </member>
+ <member kind="function">
+ <type>local uInt longest_match</type>
+ <name>OF</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>aafad197bf6ab131a1734f6c8150b162b</anchor>
+ <arglist>((deflate_state *s, IPos cur_match))</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateInit_</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a0e6601591faa9573f27340153b0f3296</anchor>
+ <arglist>(z_streamp strm, int level, const char *version, int stream_size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateInit2_</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>ae501d2862c68d17b909d6f1c9264815c</anchor>
+ <arglist>(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateSetDictionary</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a4e2855f986abd56d4515e9bb09986a5b</anchor>
+ <arglist>(z_streamp strm, const Bytef *dictionary, uInt dictLength)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateReset</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a4f17a4d330d76066b4b26c27f7cde5dc</anchor>
+ <arglist>(z_streamp strm)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateSetHeader</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a0bb9d562cacbe698297de30cdeeb2153</anchor>
+ <arglist>(z_streamp strm, gz_headerp head)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflatePrime</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>aa8ca15b272bfde8fd23ab658d789aa87</anchor>
+ <arglist>(z_streamp strm, int bits, int value)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateParams</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a6be3d26b7e317aa4db6c7870b1911d4d</anchor>
+ <arglist>(z_streamp strm, int level, int strategy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateTune</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>aa2f2f8ee11441c80c35f035ad7efbb8e</anchor>
+ <arglist>(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain)</arglist>
+ </member>
+ <member kind="function">
+ <type>uLong ZEXPORT</type>
+ <name>deflateBound</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a746d0203373d0033ab69055f72a370e8</anchor>
+ <arglist>(z_streamp strm, uLong sourceLen)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>putShortMSB</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a6db0a0a840addf113cb217c4aa1c0384</anchor>
+ <arglist>(deflate_state *s, uInt b)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>flush_pending</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>ae9a3263767d40c4f7443bf07c31e0119</anchor>
+ <arglist>(z_streamp strm)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflate</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>aedba3a94d6e827d61b660443ae5b9f09</anchor>
+ <arglist>(z_streamp strm, int flush)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateEnd</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>ada68769789b1d84de7e708d6e848a075</anchor>
+ <arglist>(z_streamp strm)</arglist>
+ </member>
+ <member kind="function">
+ <type>int ZEXPORT</type>
+ <name>deflateCopy</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a496430688ab9f4179689c883a6776b02</anchor>
+ <arglist>(z_streamp dest, z_streamp source)</arglist>
+ </member>
+ <member kind="function">
+ <type>local int</type>
+ <name>read_buf</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a30b7fcd3e6bea023c1c00eafad492639</anchor>
+ <arglist>(z_streamp strm, Bytef *buf, unsigned size)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>lm_init</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>ab197bb7bbeee75dcfccbfa8d55cae272</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local uInt</type>
+ <name>longest_match</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a9c89f33a3fab1b87063832eeda415389</anchor>
+ <arglist>(deflate_state *s, IPos cur_match)</arglist>
+ </member>
+ <member kind="function">
+ <type>local uInt</type>
+ <name>longest_match_fast</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>ada5e12c38f51cac74465ef4af16e46ed</anchor>
+ <arglist>(deflate_state *s, IPos cur_match)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>fill_window</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a6cf3c43817cac5f5c422e94b2a57ea49</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local block_state</type>
+ <name>deflate_stored</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a67569326587f77f823522212036fc2f9</anchor>
+ <arglist>(deflate_state *s, int flush)</arglist>
+ </member>
+ <member kind="function">
+ <type>local block_state</type>
+ <name>deflate_fast</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a1ee6259c01fb1c8cd3ecc551a8fe7192</anchor>
+ <arglist>(deflate_state *s, int flush)</arglist>
+ </member>
+ <member kind="function">
+ <type>local block_state</type>
+ <name>deflate_slow</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a9fc7e4969451bb185e77d530c376f79f</anchor>
+ <arglist>(deflate_state *s, int flush)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const char</type>
+ <name>deflate_copyright</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a75f4ce56f376b4ec7efc61fab510c8e7</anchor>
+ <arglist>[]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const config</type>
+ <name>configuration_table</name>
+ <anchorfile>deflate_8c.html</anchorfile>
+ <anchor>a9d8772078a7001d0dc9bd34789631322</anchor>
+ <arglist>[10]</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>deflate.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>deflate_8h</filename>
+ <includes id="zutil_8h" name="zutil.h" local="yes" imported="no">zutil.h</includes>
+ <class kind="struct">ct_data_s</class>
+ <class kind="struct">tree_desc_s</class>
+ <class kind="struct">internal_state</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>LENGTH_CODES</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a8dd3b78c666b6592944b2acf1706e611</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>LITERALS</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a3f59145500c9de746e7dc49fb98c29ef</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>L_CODES</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a2b0cc00cc6a7d521fba8d208a1cae477</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>D_CODES</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a8798a9a526623abbd88fedb0727e21aa</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>BL_CODES</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a9e19158a493307d4f211cdf223da8319</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEAP_SIZE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a1b45302695680930829cac31d65e41e1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_BITS</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a51c241e7ad52441b8d4c1fd5f498b3b9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>INIT_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a96cb576b9a3b5f8cb90bd4bb7ee449d2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>EXTRA_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>affc01bd472ba5f5ad1519c40e20a3778</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NAME_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>acec08b85e51457d214b759d489785e99</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>COMMENT_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a06c47936258e98a0c4ca38dd31a5f6c7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HCRC_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a09dffa22705cbe81ca94b8b379d43682</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>BUSY_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a4821f69a5605c2618cd4dc4d3f60979c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>FINISH_STATE</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a0474cba74b039aa45fe9412c1de86bed</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Freq</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a8bab2775fa423836b05f407d2f8bf6e2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Code</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a068e76e6034d06450385bc98b69ea53e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Dad</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>ad76da95d6074d29bacb152bc46d189d5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Len</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a4490e644c06783cc69ad87c121e39e94</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>max_insert_length</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a0aa718c141a5a98e84262fd9fc042dbe</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>put_byte</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a662a0774c0de95a9f1309019d52e914b</anchor>
+ <arglist>(s, c)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MIN_LOOKAHEAD</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>aab627bcc7d38e658a93d395c50180cb8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_DIST</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a1bac515806be1e59d7306b4126b0cca4</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>d_code</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a578b4336ef92d19278e0a0d95699def5</anchor>
+ <arglist>(dist)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>_tr_tally_lit</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>af3b11322da0fb4ec60a5ccc28e2554df</anchor>
+ <arglist>(s, c, flush)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>_tr_tally_dist</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a68f55cdd396ad603d9f0b01afdbdf592</anchor>
+ <arglist>(s, distance, length, flush)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct ct_data_s</type>
+ <name>ct_data</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a0a4b5df3b2254c627b8a59e038963118</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct static_tree_desc_s</type>
+ <name>static_tree_desc</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a905910aabf6aabbe79ff0832e4a664cc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tree_desc_s</type>
+ <name>tree_desc</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>ae978a66d78f0d68f945f48951f9151ff</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>ush</type>
+ <name>Pos</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a80a8610ae675eaeead82013bacde10a1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>Pos FAR</type>
+ <name>Posf</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a7fc422ecb86afdd5f330dad6f7c1136b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned</type>
+ <name>IPos</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>ada696b787a46d01634b6365afcec1a9e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct internal_state</type>
+ <name>deflate_state</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>aeaabc84f4830ec10deb9b64bd719617a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void _tr_init</type>
+ <name>OF</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a7421434e97aacf6ea4ddd238d18bf9c8</anchor>
+ <arglist>((deflate_state *s))</arglist>
+ </member>
+ <member kind="function">
+ <type>int _tr_tally</type>
+ <name>OF</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>ad2b29e535c13f6bfd762db8d1dd3bb3f</anchor>
+ <arglist>((deflate_state *s, unsigned dist, unsigned lc))</arglist>
+ </member>
+ <member kind="function">
+ <type>void _tr_flush_block</type>
+ <name>OF</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>af8aa63aa73ba838890d15dddb92e2360</anchor>
+ <arglist>((deflate_state *s, charf *buf, ulg stored_len, int eof))</arglist>
+ </member>
+ <member kind="variable">
+ <type>uch</type>
+ <name>_length_code</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>a034daec5591675c08dd7dde5a753a8da</anchor>
+ <arglist>[]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uch</type>
+ <name>_dist_code</name>
+ <anchorfile>deflate_8h.html</anchorfile>
+ <anchor>af81d7b42325e3ddbcf2cca9436d0b310</anchor>
+ <arglist>[]</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp_8c</filename>
+ <includes id="tcomp_8h" name="tcomp.h" local="yes" imported="no">tcomp.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tcomp.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_buffer.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__buffer_8c</filename>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <class kind="struct">tcomp_buffer_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>PRIME_1</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ac795fa13b7b06403d272208285faa4c2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>PRIME_2</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>af979ca8ff762895d3699e3f91a7a7ac8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_buffer_s</type>
+ <name>tcomp_buffer_t</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a00631535fe1bb8a1c3e4bcea429462ca</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>tcomp_buffer_create</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ade874ca0fc008d19c557492cd92aa33d</anchor>
+ <arglist>(const void *data, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>tcomp_buffer_create_null</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>aa5cfdc24ecf030dd0ffb5f07289de0e5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_equals</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ac6aa7f6b24a791e898c1fc616c345ab0</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle1, const tcomp_buffer_handle_t *handle2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_startsWith</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a2142e972cc4cb5f534b43b72ee733513</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle1, const tcomp_buffer_handle_t *handle2)</arglist>
+ </member>
+ <member kind="function">
+ <type>const uint8_t *</type>
+ <name>tcomp_buffer_getReadOnlyBufferAtPos</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a9fba8be7ab9dc38279c3b14254d325f1</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle, tsk_size_t position)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t *</type>
+ <name>tcomp_buffer_getBufferAtPos</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a1757d7fa138bae185bd36fa6ce56b8eb</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle, tsk_size_t position)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_buffer_getSize</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a959ada505a0d1b73a3b020cb8bbe01d6</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_buffer_getRemainingBits</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ae869eb4293f721e25f47c1be0a037713</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t *</type>
+ <name>tcomp_buffer_readBytes</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ac047c83dc6a29bdf1e7e9c60b4c0d280</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t length)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_buffer_readLsbToMsb</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a0b432914f2af2cf3d1d04b32989536c8</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t length)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_buffer_readMsbToLsb</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>aaad8d6dcaf4c6ffa957b038bca55a5a5</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t length)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_discardBits</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>aa1eb82e5dc1dcf5132ead711f36d5b7d</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_discardLastBytes</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a3776db46a6db1354e8f4d005ee29df55</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, uint16_t count)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_allocBuff</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a1e73d9b8ed8fda1f167d4d951e1e8f26</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_referenceBuff</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>abad7889e4712317b5e8bfa3fbd8c3a29</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, uint8_t *externalBuff, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_appendBuff</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a019e73ec35a3d0a5cb0d3dadf8f62df6</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_removeBuff</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a35a7ef87468f1df6edf45476b01c2a09</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t pos, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_freeBuff</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a6784139de22f5733384ea1fa2be25a74</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t *</type>
+ <name>tcomp_buffer_getIndexBytes</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a91b80cc3c954d9aa5296683dbd66993e</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t *</type>
+ <name>tcomp_buffer_getIndexBits</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a0c7e69c96f0d8ef6512c04a4e7ca376b</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t *</type>
+ <name>tcomp_buffer_getP_BIT</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a791d3f1c107a65c2fde0ad782315a5a6</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tcomp_buffer_createHash</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a9a02469eaa630285bb3482abceadb8ec</anchor>
+ <arglist>(const void *data, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_nprint</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>ae530f6d538bfcdbc73dd49d5bff31135</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_reset</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a885d54447fb62c4223b212f386d304e2</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_buffer_def_t</name>
+ <anchorfile>tcomp__buffer_8c.html</anchorfile>
+ <anchor>a2c49d9356221b178839dc2892a3da27d</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_buffer.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__buffer_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_P_BIT_MSB_TO_LSB</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>afb63054a518d87c6fffcfd9b7c89b5c5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_P_BIT_LSB_TO_MSB</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a7b99c2f2efb0bd844d6a8ab097a84f03</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_buffer_getReadOnlyBuffer</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>aa5e27561b89a1c2692891f1a6ffd8f1e</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_buffer_getBuffer</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ad7f83692c850f186a3d1a8bcfb54b9a5</anchor>
+ <arglist>(handle)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_buffer_print</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a59d7a079dafc1a5f7383653f0215d5e3</anchor>
+ <arglist>(handle)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>void</type>
+ <name>tcomp_buffer_handle_t</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>aeb155cac21d622093c9ea495b9b8e144</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>tcomp_buffer_create</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ade874ca0fc008d19c557492cd92aa33d</anchor>
+ <arglist>(const void *data, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>tcomp_buffer_create_null</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>aa5cfdc24ecf030dd0ffb5f07289de0e5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_equals</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ac6aa7f6b24a791e898c1fc616c345ab0</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle1, const tcomp_buffer_handle_t *handle2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_startsWith</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a2142e972cc4cb5f534b43b72ee733513</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle1, const tcomp_buffer_handle_t *handle2)</arglist>
+ </member>
+ <member kind="function">
+ <type>const uint8_t *</type>
+ <name>tcomp_buffer_getReadOnlyBufferAtPos</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a9fba8be7ab9dc38279c3b14254d325f1</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle, tsk_size_t position)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API uint8_t *</type>
+ <name>tcomp_buffer_getBufferAtPos</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ac35fd2027e83860b72cf70126d5c5365</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle, tsk_size_t position)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tsk_size_t</type>
+ <name>tcomp_buffer_getSize</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a808b0666fcc1e51130d596face2e6c4a</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_buffer_getRemainingBits</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ae869eb4293f721e25f47c1be0a037713</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t *</type>
+ <name>tcomp_buffer_readBytes</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a46837a573c6da78391d789121d735c1e</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_buffer_readLsbToMsb</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a0b432914f2af2cf3d1d04b32989536c8</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t length)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_buffer_readMsbToLsb</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>aaad8d6dcaf4c6ffa957b038bca55a5a5</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t length)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_discardBits</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>aa1eb82e5dc1dcf5132ead711f36d5b7d</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_discardLastBytes</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a3776db46a6db1354e8f4d005ee29df55</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, uint16_t count)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_allocBuff</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a1e73d9b8ed8fda1f167d4d951e1e8f26</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_referenceBuff</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>abad7889e4712317b5e8bfa3fbd8c3a29</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, uint8_t *externalBuff, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_appendBuff</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a019e73ec35a3d0a5cb0d3dadf8f62df6</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_buffer_removeBuff</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a35a7ef87468f1df6edf45476b01c2a09</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t pos, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_freeBuff</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a6784139de22f5733384ea1fa2be25a74</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t *</type>
+ <name>tcomp_buffer_getIndexBytes</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a91b80cc3c954d9aa5296683dbd66993e</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t *</type>
+ <name>tcomp_buffer_getIndexBits</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a0c7e69c96f0d8ef6512c04a4e7ca376b</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t *</type>
+ <name>tcomp_buffer_getP_BIT</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a791d3f1c107a65c2fde0ad782315a5a6</anchor>
+ <arglist>(const tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tcomp_buffer_createHash</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a9a02469eaa630285bb3482abceadb8ec</anchor>
+ <arglist>(const void *data, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_nprint</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ae530f6d538bfcdbc73dd49d5bff31135</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_buffer_reset</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>a885d54447fb62c4223b212f386d304e2</anchor>
+ <arglist>(tcomp_buffer_handle_t *handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_buffer_def_t</name>
+ <anchorfile>tcomp__buffer_8h.html</anchorfile>
+ <anchor>ab999d1d75af8f413a39fc9f6a7bc6eb5</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compartment.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compartment_8c</filename>
+ <includes id="tcomp__compartment_8h" name="tcomp_compartment.h" local="yes" imported="no">tcomp_compartment.h</includes>
+ <member kind="function">
+ <type>tcomp_compartment_t *</type>
+ <name>tcomp_compartment_create</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a6b54e7390394503148bea84d5e9cd52e</anchor>
+ <arglist>(uint64_t id, uint16_t sigCompParameters)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setRemoteParams</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a1e68190c2c83dba80461cbc81ec6463a</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_params_t *lpParams)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setReqFeedback</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a9dd145ec13b7edfd3c28caf08971adad</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setRetFeedback</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>ad1011202565be1ddb9a2f65fbf3da366</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_clearStates</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a0b9915ceb760196e51bc0ffa1f33ed48</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeStateByPriority</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a00e53894db779de7ee81bd956b56e481</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeState</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a4e1a157aaadda59389637c197407e918</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeStates</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a7e1a55b8673488be557da7f4b03c81c2</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_tempstate_to_free_t **tempStates, uint8_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_addState</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a8dadab6275e5e795cc5113411ef8082e</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_compartment_findState</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>ab72144795fc6997fcf2103b893ea17c8</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeGhostState</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a2afc3585b73665d6dddf93e9889b19e1</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_addNack</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a5c182d465dd341481e4b74ee77acbc9d</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const uint8_t nackId[TSK_SHA1_DIGEST_SIZE])</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compartment_hasNack</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>a17e4a4d6725f159e090c5b0a861146ae</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *nackId)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_compartment_def_t</name>
+ <anchorfile>tcomp__compartment_8c.html</anchorfile>
+ <anchor>af774aca2c83810a86731d25cf82bbd07</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compartment.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compartment_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__types_8h" name="tcomp_types.h" local="yes" imported="no">tcomp_types.h</includes>
+ <includes id="tcomp__params_8h" name="tcomp_params.h" local="yes" imported="no">tcomp_params.h</includes>
+ <includes id="tcomp__compressordata_8h" name="tcomp_compressordata.h" local="yes" imported="no">tcomp_compressordata.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <class kind="struct">tcomp_compartment_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_compartment_s</type>
+ <name>tcomp_compartment_t</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a8f70456ed6f078247d22edbbcfe41adb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_compartment_t *</type>
+ <name>tcomp_compartment_create</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a6b54e7390394503148bea84d5e9cd52e</anchor>
+ <arglist>(uint64_t id, uint16_t sigCompParameters)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setRemoteParams</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a1e68190c2c83dba80461cbc81ec6463a</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_params_t *lpParams)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setReqFeedback</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a9dd145ec13b7edfd3c28caf08971adad</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_setRetFeedback</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>ad1011202565be1ddb9a2f65fbf3da366</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_buffer_handle_t *feedback)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_clearStates</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a0b9915ceb760196e51bc0ffa1f33ed48</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeStateByPriority</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a00e53894db779de7ee81bd956b56e481</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeState</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a4e1a157aaadda59389637c197407e918</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeStates</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a7e1a55b8673488be557da7f4b03c81c2</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_tempstate_to_free_t **tempStates, uint8_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_addState</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a8dadab6275e5e795cc5113411ef8082e</anchor>
+ <arglist>(tcomp_compartment_t *compartment, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_compartment_findState</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>ab72144795fc6997fcf2103b893ea17c8</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_freeGhostState</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a2afc3585b73665d6dddf93e9889b19e1</anchor>
+ <arglist>(tcomp_compartment_t *compartment)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_compartment_addNack</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a5c182d465dd341481e4b74ee77acbc9d</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const uint8_t nackId[TSK_SHA1_DIGEST_SIZE])</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compartment_hasNack</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a17e4a4d6725f159e090c5b0a861146ae</anchor>
+ <arglist>(tcomp_compartment_t *compartment, const tcomp_buffer_handle_t *nackId)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_compartment_def_t</name>
+ <anchorfile>tcomp__compartment_8h.html</anchorfile>
+ <anchor>a7fd4a96decbd8c096b50785b5b74d19d</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressor.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressor_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__compartment_8h" name="tcomp_compartment.h" local="yes" imported="no">tcomp_compartment.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_COMPRESSOR_COMPRESS_F</name>
+ <anchorfile>tcomp__compressor_8h.html</anchorfile>
+ <anchor>ab529ce900a984f595f961d6fb2b9e565</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_bool_t(*</type>
+ <name>tcomp_compressor_compress_f</name>
+ <anchorfile>tcomp__compressor_8h.html</anchorfile>
+ <anchor>a89e8cf822600cb829f045cc6da482710</anchor>
+ <arglist>)(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressor_deflate.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressor__deflate_8c</filename>
+ <includes id="tcomp__compressor__deflate_8h" name="tcomp_compressor_deflate.h" local="yes" imported="no">tcomp_compressor_deflate.h</includes>
+ <includes id="tcomp__deflatedata_8h" name="tcomp_deflatedata.h" local="yes" imported="no">tcomp_deflatedata.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_MIN</name>
+ <anchorfile>tcomp__compressor__deflate_8c.html</anchorfile>
+ <anchor>ac287da0fb72036ee49a6a6d7f457cc79</anchor>
+ <arglist>(a, b)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GET_OUTPUT_BUFFER_AT</name>
+ <anchorfile>tcomp__compressor__deflate_8c.html</anchorfile>
+ <anchor>a76f3d65a88b375c145f2f313adf6a449</anchor>
+ <arglist>(position)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compressor_deflate_compress</name>
+ <anchorfile>tcomp__compressor__deflate_8c.html</anchorfile>
+ <anchor>adefbb1a9f55fc924b6dda8ebc75292f0</anchor>
+ <arglist>(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressor_deflate.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressor__deflate_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__compartment_8h" name="tcomp_compartment.h" local="yes" imported="no">tcomp_compartment.h</includes>
+ <member kind="function">
+ <type>TCOMP_BEGIN_DECLS tsk_bool_t</type>
+ <name>tcomp_compressor_deflate_compress</name>
+ <anchorfile>tcomp__compressor__deflate_8h.html</anchorfile>
+ <anchor>a40af6c9124355c4ff307be664c331b62</anchor>
+ <arglist>(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressor_dummy.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressor__dummy_8c</filename>
+ <includes id="tcomp__compressor__dummy_8h" name="tcomp_compressor_dummy.h" local="yes" imported="no">tcomp_compressor_dummy.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>UNCOMPRESSED_BYTECODE_LENGTH</name>
+ <anchorfile>tcomp__compressor__dummy_8c.html</anchorfile>
+ <anchor>a7a8c0e6248ad14bc6615489014489f6f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>UNCOMPRESSED_BYTECODE_DESTINATION_CODE</name>
+ <anchorfile>tcomp__compressor__dummy_8c.html</anchorfile>
+ <anchor>a85cae11bb40fafaf6013352ec2d26f90</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DUMMYCOMPRESSOR_UNCOMPRESSED_BYTECODE</name>
+ <anchorfile>tcomp__compressor__dummy_8c.html</anchorfile>
+ <anchor>a68c31c7fb503b833ce15873496d6d6b1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compressor_dummy_compress</name>
+ <anchorfile>tcomp__compressor__dummy_8c.html</anchorfile>
+ <anchor>aaf174210ca73b13b364f0c72a2b35f32</anchor>
+ <arglist>(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressor_dummy.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressor__dummy_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__compartment_8h" name="tcomp_compartment.h" local="yes" imported="no">tcomp_compartment.h</includes>
+ <member kind="function">
+ <type>TCOMP_BEGIN_DECLS tsk_bool_t</type>
+ <name>tcomp_compressor_dummy_compress</name>
+ <anchorfile>tcomp__compressor__dummy_8h.html</anchorfile>
+ <anchor>afe355c7530573a73b869c5378e116a36</anchor>
+ <arglist>(tcomp_compartment_t *lpCompartment, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressordata.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressordata_8c</filename>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressordata.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressordata_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_DECLARE_COMPRESSORDATA</name>
+ <anchorfile>tcomp__compressordata_8h.html</anchorfile>
+ <anchor>a8df9e4af38727aa7790a1a646efd206c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>void(*</type>
+ <name>tcomp_xxx_freeGhostState</name>
+ <anchorfile>tcomp__compressordata_8h.html</anchorfile>
+ <anchor>a0881ddad615d5b5444cd8c8bae4efd76</anchor>
+ <arglist>)(tcomp_compressordata_t *data)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>void(*</type>
+ <name>tcomp_xxx_ackGhost</name>
+ <anchorfile>tcomp__compressordata_8h.html</anchorfile>
+ <anchor>aa6c12669c69b66fc068f2e411b112a04</anchor>
+ <arglist>)(tcomp_compressordata_t *data, const tcomp_buffer_handle_t *stateid)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TCOMP_BEGIN_DECLS typedef void</type>
+ <name>tcomp_compressordata_t</name>
+ <anchorfile>tcomp__compressordata_8h.html</anchorfile>
+ <anchor>ac8063895d2b39f7377af53f087437a5b</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressordisp.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressordisp_8c</filename>
+ <includes id="tcomp__compressordisp_8h" name="tcomp_compressordisp.h" local="yes" imported="no">tcomp_compressordisp.h</includes>
+ <includes id="tcomp__compressor__dummy_8h" name="tcomp_compressor_dummy.h" local="yes" imported="no">tcomp_compressor_dummy.h</includes>
+ <includes id="tcomp__compressor__deflate_8h" name="tcomp_compressor_deflate.h" local="yes" imported="no">tcomp_compressor_deflate.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_NACK_SUPPORTED</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>a38e55ba6ae6fbbe1c82e843a7430ed4e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_compressordisp_t *</type>
+ <name>tcomp_compressordisp_create</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>a65a06e5aa5ac1f93484be2543c5fd655</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compressordisp_compress</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>aec43191d86a10978161c029f18e5f981</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, uint64_t compartmentId, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_compressordisp_addCompressor</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>aa29cb2515cfea50662f3b548d4754738</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_compressordisp_removeCompressor</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>ace1899914be8d3bb6795ab5d1a99cb3e</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_compressordisp_def_t</name>
+ <anchorfile>tcomp__compressordisp_8c.html</anchorfile>
+ <anchor>aad9a1d5ae9edb5d8fe3eeeabe92220c9</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_compressordisp.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__compressordisp_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__statehandler_8h" name="tcomp_statehandler.h" local="yes" imported="no">tcomp_statehandler.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <includes id="tcomp__types_8h" name="tcomp_types.h" local="yes" imported="no">tcomp_types.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <includes id="tcomp__compressor_8h" name="tcomp_compressor.h" local="yes" imported="no">tcomp_compressor.h</includes>
+ <class kind="struct">tcomp_compressordisp_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_MAX_COMPRESSORS</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>a8d2e7bb50fd6bbdc19ed27a1e846fca5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_compressordisp_s</type>
+ <name>tcomp_compressordisp_t</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>a23efaf69247656c591bee204825088dc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_compressordisp_t *</type>
+ <name>tcomp_compressordisp_create</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>a65a06e5aa5ac1f93484be2543c5fd655</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_compressordisp_compress</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>aec43191d86a10978161c029f18e5f981</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, uint64_t compartmentId, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t *output_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_compressordisp_addCompressor</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>aa29cb2515cfea50662f3b548d4754738</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_compressordisp_removeCompressor</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>ace1899914be8d3bb6795ab5d1a99cb3e</anchor>
+ <arglist>(tcomp_compressordisp_t *dispatcher, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_compressordisp_def_t</name>
+ <anchorfile>tcomp__compressordisp_8h.html</anchorfile>
+ <anchor>a92cc61440724991756c773342fccd17e</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_decompressordisp.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__decompressordisp_8c</filename>
+ <includes id="tcomp__decompressordisp_8h" name="tcomp_decompressordisp.h" local="yes" imported="no">tcomp_decompressordisp.h</includes>
+ <includes id="tcomp__message_8h" name="tcomp_message.h" local="yes" imported="no">tcomp_message.h</includes>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_MAX_STREAM_BUFFER_SIZE</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>aa4a8fdb851b4620b67a1d52d65441ed1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_NACK_SUPPORTED</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>ad278be58a5d53380479e7e53c1ec01bf</anchor>
+ <arglist>(dispatcher)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_stream_buffer_t *</type>
+ <name>tcomp_stream_buffer_create</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a998e223ef468fc09a9f8613c5d5d0854</anchor>
+ <arglist>(uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_decompressordisp_t *</type>
+ <name>tcomp_decompressordisp_create</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a22004ec43206b3803b3f6d978b058f0a</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_decompress</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a74fb7a3ff671e4576c0fb818b7760dc0</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_getNextMessage</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>aebe1904896d38c815f464353e6f5d8a0</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_internalDecompress</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a7194a6ba35ad1935b76fce25db19ec28</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, const tsk_size_t input_size, tcomp_result_t **lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_appendStream</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a91fd6f2e49b3cbe6fb2a574c20448d79</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, tsk_size_t input_size, uint64_t streamId)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_getNextStreamMsg</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a1d16a0b0eb86e5538cd37aaf8214aa04</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, uint64_t streamId, uint16_t *discard_count, tsk_size_t *size)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_decompressordisp_def_t</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a1782b0cf481d122093472b147fb944b6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_stream_buffer_def_t</name>
+ <anchorfile>tcomp__decompressordisp_8c.html</anchorfile>
+ <anchor>a94e7516c75f7a0076067b7d2640cccc3</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_decompressordisp.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__decompressordisp_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__statehandler_8h" name="tcomp_statehandler.h" local="yes" imported="no">tcomp_statehandler.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <includes id="tcomp__types_8h" name="tcomp_types.h" local="yes" imported="no">tcomp_types.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <class kind="struct">tcomp_stream_buffer_s</class>
+ <class kind="struct">tcomp_decompressordisp_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_stream_buffer_s</type>
+ <name>tcomp_stream_buffer_t</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a657b520236f10cc7eb86124b11f0a768</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_decompressordisp_s</type>
+ <name>tcomp_decompressordisp_t</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a02011c3f486e9780d2fb6191279631d6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_decompressordisp_t *</type>
+ <name>tcomp_decompressordisp_create</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a22004ec43206b3803b3f6d978b058f0a</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_decompress</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a74fb7a3ff671e4576c0fb818b7760dc0</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_getNextMessage</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>aebe1904896d38c815f464353e6f5d8a0</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_internalDecompress</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a7194a6ba35ad1935b76fce25db19ec28</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, const tsk_size_t input_size, tcomp_result_t **lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_appendStream</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a91fd6f2e49b3cbe6fb2a574c20448d79</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, const void *input_ptr, tsk_size_t input_size, uint64_t streamId)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_decompressordisp_getNextStreamMsg</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a1d16a0b0eb86e5538cd37aaf8214aa04</anchor>
+ <arglist>(tcomp_decompressordisp_t *dispatcher, uint64_t streamId, uint16_t *discard_count, tsk_size_t *size)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_stream_buffer_def_t</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a74fb91763a99373e6338f2e473f0637c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_decompressordisp_def_t</name>
+ <anchorfile>tcomp__decompressordisp_8h.html</anchorfile>
+ <anchor>a263d9f0ed06601f9458d841e0abf47b4</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_deflatedata.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__deflatedata_8c</filename>
+ <includes id="tcomp__deflatedata_8h" name="tcomp_deflatedata.h" local="yes" imported="no">tcomp_deflatedata.h</includes>
+ <member kind="function">
+ <type>tcomp_deflatedata_t *</type>
+ <name>tcomp_deflatedata_create_2</name>
+ <anchorfile>tcomp__deflatedata_8c.html</anchorfile>
+ <anchor>acc107c5868ee319ab31775516a7b1008</anchor>
+ <arglist>(tsk_bool_t isStream, int z_level, int z_windowBits)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_deflatedata_t *</type>
+ <name>tcomp_deflatedata_create</name>
+ <anchorfile>tcomp__deflatedata_8c.html</anchorfile>
+ <anchor>a613938dc503712a88a29682f1b3332d3</anchor>
+ <arglist>(tsk_bool_t isStream)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_isStateful</name>
+ <anchorfile>tcomp__deflatedata_8c.html</anchorfile>
+ <anchor>a6f6fa6262b170743244a1905866e7a49</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_deflatedata_def_t</name>
+ <anchorfile>tcomp__deflatedata_8c.html</anchorfile>
+ <anchor>ae43e14c938ca02c0945e781d71943e6c</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_deflatedata.ghost.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__deflatedata_8ghost_8c</filename>
+ <includes id="tcomp__deflatedata_8h" name="tcomp_deflatedata.h" local="yes" imported="no">tcomp_deflatedata.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_CB_START_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>af61dd76b0f070596ff477fa5fb11ff95</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_DMS_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>aa0e73f1c8b5cc6579fe838c8f896bfe1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_0x0005_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a1361b59108a666ce5794c1fdcbf69cdd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_CB_END_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a438bef24bb5c09d4cf891a28e973378a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_HASH_LEN_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>aaefce17480e56589a8bd181a4073cb0e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_SMS_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>ad79d54e5e2d4e9e37b4d5ba2302edc0e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_CPB_DMS_SMS_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>ad8b17d69112d417446dee27863e30350</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_VERSION_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a8909b9553131b824cc647ae858eb0da0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_BYTECODE1_SIZE</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>adb3ba3e24b34c2226b1a867158733d68</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_STATE_ADDRESS</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>aa3cb78c7b5d91c728d09c65fe9dd4d35</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_STATE_INSTRUCTION</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>add6e53f528b0b7d81b7dbc774e173609</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_STATE_MIN_ACCESS_LEN</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a97b586450efa48aa8cd9f16a2d599b37</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_STATE_RETENTION_PRIORITY</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a4dfae63f9636d012a8b45851e8a971e8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOSTVALUE_AT</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a2cdf0b5cd6985cf45e788e85f640386a</anchor>
+ <arglist>(position)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_DICT_CODE_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>aae1d230748b69f7026584ec75e890296</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_DICT_WORDS_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a7393f41cb8c02bfa84f55105cca5954c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_FIXME2_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a4dbfaf358c10a950c233f8c06cc68cc7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_DEFLATE_BYTECODE_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a56dbe0e0d362dd7fbdffea9758c19887</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOST_INPUT_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>addd836add0b7388c1c95dcf2dcd8d07e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GHOSTVALUE_AT</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a2cdf0b5cd6985cf45e788e85f640386a</anchor>
+ <arglist>(position)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZBUFF_LEN</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a587b1133cca8e91689f275380d6310a0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_createGhost</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a685b9a7b997d9aeca3174530211711c7</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, uint16_t state_length, tcomp_params_t *params)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_ackGhost</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>aadc5f39e93866e0cb2cd3b29bb99d12e</anchor>
+ <arglist>(tcomp_compressordata_t *data, const tcomp_buffer_handle_t *stateid)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_updateGhost</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a0c7dceae6a0f82652892d7d5c53da363</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, const uint8_t *input_ptr, tsk_size_t input_size)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint32_t *</type>
+ <name>tcomp_deflatedata_getGhostCopyOffset</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>acd4ef201aad5c16cc01703429e152509</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_freeGhostState</name>
+ <anchorfile>tcomp__deflatedata_8ghost_8c.html</anchorfile>
+ <anchor>a5706f951dba8f9b03a2bddfa24be5264</anchor>
+ <arglist>(tcomp_compressordata_t *data)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_deflatedata.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__deflatedata_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__params_8h" name="tcomp_params.h" local="yes" imported="no">tcomp_params.h</includes>
+ <includes id="tcomp__state_8h" name="tcomp_state.h" local="yes" imported="no">tcomp_state.h</includes>
+ <includes id="tcomp__compressordata_8h" name="tcomp_compressordata.h" local="yes" imported="no">tcomp_compressordata.h</includes>
+ <includes id="zlib_8h" name="zlib.h" local="yes" imported="no">zlib.h</includes>
+ <class kind="struct">tcomp_deflateStream_s</class>
+ <class kind="struct">tcomp_deflatedata_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>USE_DICTS_FOR_COMPRESSION</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>adc85d4d5b991939e39bf3fcd2b41e0e5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_DEFAULT_WINDOW_BITS</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a3ffc2b8c8034c6e80474b0ad988a4ab6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_DECOMPRESSION_PTR_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>aecf738b0f582de9a6f93a0d807750040</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_UDVM_CIRCULAR_START_INDEX</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a297a076f50ac3d10649b26b083b6a4d9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_SIP_DICT_ONLY</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a8a677017c1bf51b65dc49b541c46242c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_PRES_DICT_ONLY</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>ab7869b22a284727e3bafa890de3f08f5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_SIP_PRES_DICTS</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a56e78baa3f167e1222521a92b5411470</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_NO_DICT</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a7b3a9bb16609d4529913a50ccd1e8117</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_FIXME_DICT</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a70b3741fac20f597294e67ec88c1ffd2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_BYTECODE_DESTINATION_START</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>ac519f027665fcff17a6adcf26ce13e87</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_BYTECODE_DESTINATION_CODE</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a1bfccabe5485ea3856fb661a360fcdcc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATE_BYTECODE_LEN</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a5301d24aea35ac0ae5b82c8b209e7c96</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEFLATEDATA_DEFLATE_BYTECODE</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a8ad70b4284af8f191f3e033784726a3c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_deflateStream_s</type>
+ <name>tcomp_deflateStream_t</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>afadd5ec8fe340558dde8db99700bcbab</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_deflatedata_s</type>
+ <name>tcomp_deflatedata_t</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a51603f0230b2555a35c740b64d95b7d7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflateStream_end</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a1bdeb3020a7e79ac2e0752c3c9048de9</anchor>
+ <arglist>(tcomp_deflateStream_t *stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflateStream_copy</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a807b1c81bc1f376a5464a6e8e13f766d</anchor>
+ <arglist>(tcomp_deflateStream_t *stream, tcomp_deflateStream_t *source)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_deflatedata_t *</type>
+ <name>tcomp_deflatedata_create</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a613938dc503712a88a29682f1b3332d3</anchor>
+ <arglist>(tsk_bool_t isStream)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_freeGhostState</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a84abeb10334414bf025282d103f56c3e</anchor>
+ <arglist>(tcomp_compressordata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_ackGhost</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a9ee70414f50b4c064e5502da176c7396</anchor>
+ <arglist>(tcomp_compressordata_t *deflatedata, const tcomp_buffer_handle_t *stateid)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_createGhost</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a416082cf8161cfd26293df7273300e7e</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, uint16_t state_len, tcomp_params_t *params)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_updateGhost</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a0c7dceae6a0f82652892d7d5c53da363</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, const uint8_t *input_ptr, tsk_size_t input_size)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint32_t *</type>
+ <name>tcomp_deflatedata_getGhostCopyOffset</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>acd4ef201aad5c16cc01703429e152509</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zReset</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a87d68a52cbaa9a6500d00dbfad52cf16</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zCompress</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a38a642737f96d3f6bb81eb8025136d25</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, const void *in, tsk_size_t inLen, void *out, tsk_size_t *outLen, tsk_bool_t *stateChanged)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_deflatedata_zGetWindowBits</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>ac1db80d4be4336cd73f03ad7d0de84ec</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_zSetWindowBits</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a0ad0c57a166fbf0700f2b4a0203b6581</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, int windowSize)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_isStateful</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a6f6fa6262b170743244a1905866e7a49</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zInit</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a279cfe52515a1de61335c1c2b5f3a64a</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zUnInit</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a20c3dbe17e832df89b6ed65a49a56ef4</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_deflatedata_def_t</name>
+ <anchorfile>tcomp__deflatedata_8h.html</anchorfile>
+ <anchor>a99d44b87f2fddf3a15186dd64b7da860</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_deflatedata.zlib.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__deflatedata_8zlib_8c</filename>
+ <includes id="tcomp__deflatedata_8h" name="tcomp_deflatedata.h" local="yes" imported="no">tcomp_deflatedata.h</includes>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflateStream_end</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a1bdeb3020a7e79ac2e0752c3c9048de9</anchor>
+ <arglist>(tcomp_deflateStream_t *stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflateStream_copy</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a807b1c81bc1f376a5464a6e8e13f766d</anchor>
+ <arglist>(tcomp_deflateStream_t *stream, tcomp_deflateStream_t *source)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zInit</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a279cfe52515a1de61335c1c2b5f3a64a</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zUnInit</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a20c3dbe17e832df89b6ed65a49a56ef4</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zReset</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a87d68a52cbaa9a6500d00dbfad52cf16</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_deflatedata_zCompress</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a38a642737f96d3f6bb81eb8025136d25</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, const void *in, tsk_size_t inLen, void *out, tsk_size_t *outLen, tsk_bool_t *stateChanged)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_deflatedata_zGetWindowBits</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>ac1db80d4be4336cd73f03ad7d0de84ec</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_deflatedata_zSetWindowBits</name>
+ <anchorfile>tcomp__deflatedata_8zlib_8c.html</anchorfile>
+ <anchor>a0ad0c57a166fbf0700f2b4a0203b6581</anchor>
+ <arglist>(tcomp_deflatedata_t *deflatedata, int windowSize)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_dicts.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__dicts_8c</filename>
+ <includes id="tcomp__dicts_8h" name="tcomp_dicts.h" local="yes" imported="no">tcomp_dicts.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <includes id="tcomp__rfc3485__dictionary__sip_8h" name="tcomp_rfc3485_dictionary_sip.h" local="yes" imported="no">tcomp_rfc3485_dictionary_sip.h</includes>
+ <includes id="tcomp__rfc5112__dictionary__presence_8h" name="tcomp_rfc5112_dictionary_presence.h" local="yes" imported="no">tcomp_rfc5112_dictionary_presence.h</includes>
+ <member kind="function">
+ <type>tcomp_dictionary_t *</type>
+ <name>tcomp_dicts_create_presence_dict</name>
+ <anchorfile>tcomp__dicts_8c.html</anchorfile>
+ <anchor>a252a72a1fd88d9e77ca46bdbe214be95</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_dictionary_t *</type>
+ <name>tcomp_dicts_create_sip_dict</name>
+ <anchorfile>tcomp__dicts_8c.html</anchorfile>
+ <anchor>a1810e66603f634d79120eb9da1400c05</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_dicts.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__dicts_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__state_8h" name="tcomp_state.h" local="yes" imported="no">tcomp_state.h</includes>
+ <member kind="function">
+ <type>TCOMP_BEGIN_DECLS tcomp_dictionary_t *</type>
+ <name>tcomp_dicts_create_presence_dict</name>
+ <anchorfile>tcomp__dicts_8h.html</anchorfile>
+ <anchor>af8882efbf74466dba5054791cdbefc8b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_dictionary_t *</type>
+ <name>tcomp_dicts_create_sip_dict</name>
+ <anchorfile>tcomp__dicts_8h.html</anchorfile>
+ <anchor>a1810e66603f634d79120eb9da1400c05</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_headers_index.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__headers__index_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_UDVM_MEMORY_SIZE_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>abf894a2433372417a5c7a0efdfbd1480</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_CYCLES_PER_BIT_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>a38cd1a41feaf84267fd1465126c48037</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_SIGCOMP_VERSION_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>af7b0bf249f78db457bc9533990706a6d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_PARTIAL_STATE_ID_LENGTH_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>a1f45d23641e4a86d78fbf1a915c62bf1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_STATE_LENGTH_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>ab110c964556fb631d3bbf083ff646cd1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_RESERVED_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>abdec1536990849d8cc41c21ca7b02304</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_BYTE_COPY_LEFT_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>ab63df45b63d7806ffd038bf04b9f6d17</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_BYTE_COPY_RIGHT_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>af5b2a6c77994d109361982281ad0291d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_INPUT_BIT_ORDER_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>a6de42eba0b2b39a807587b94380558e1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_STACK_LOCATION_INDEX</name>
+ <anchorfile>tcomp__headers__index_8h.html</anchorfile>
+ <anchor>a81e96e7c20757d40ddfad35eeef1a64f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_instructions.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__instructions_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__DECOMPRESSION_FAILURE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a87890ef162bb7da42999de8b1a72fca3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__AND</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a27a17cdb472ce8e876387431f73ca656</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__OR</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a00a24090e81502dbb3d4ee509d8302e6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__NOT</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>afdcaf9184d7aa4b98de6bd10f199add5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__LSHIFT</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a64d3e419cb78210ede1d0b7bbd9623ee</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__RSHIFT</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a3ffa5903dceacc4f09715cb930e02e09</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__ADD</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ab8ae80ceba9ef28562ca3f2bffbea1a8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__SUBTRACT</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a6db9d9fe9eed72dfdfce6a79810fac35</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__MULTIPLY</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a1bcaa1fbb2b217cf397ba6d09c1582bc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__DIVIDE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a2b693d9c2ab15facf911738ca9bed972</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__REMAINDER</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a8e39b4c47a3d72e0893e1d493db88ca1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__SORT_ASCENDING</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ac907e45ab8fe6ff439df738d6cb684f2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__SORT_DESCENDING</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ac7b53c7dcce4a218c7a2561d7f74c091</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__SHA_1</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>aeebaac7790287b4ca2c7c6437a3756af</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__LOAD</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a1c880ec11b24aaf59298dd70dc5d5f89</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__MULTILOAD</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a34380db329ac1d5d549d6eb30b08ee18</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__PUSH</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a07241036c93c177f20013d2393e1671f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__POP</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a7a714f6c0bdbc646d4c922ed6652e2f0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__COPY</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a8abff2a63e3a52f58de1f56a47299599</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__COPY_LITERAL</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a136de87e16c30224139398d073b5bb7f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__COPY_OFFSET</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a5f3ebdfe6019b02af70be90a4a2775f3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__MEMSET</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>afc29b053d19c8ae01b856027b5f81445</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__JUMP</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ae87e9b20f08e39fd00061ef631950d70</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__COMPARE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>aeb39a13beb297b6bf0e68698fc365086</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__CALL</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a784926453fbb97c8c32eff977c373785</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__RETURN</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>af516a83772c6aa1bf49fe0f3333eebc5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__SWITCH</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ad94373cd714f35ca82d5a0e1aeddd86b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__CRC</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>abc6c90cbd81d69f0ff19ab7eec62e22e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__INPUT_BYTES</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a35d4e22f76b18c463f0f1a3a47c36c65</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__INPUT_BITS</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a0d83ae2bad089ac7183a83796cb98606</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__INPUT_HUFFMAN</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a4d446dcafd6b3abf66e61cc3a16f94e6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__STATE_ACCESS</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ac4bc989b264267efc3075e76b6d69fa1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__STATE_CREATE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a3fe3316151b39751baa3beb780654763</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__STATE_FREE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a0ca162ec138dc61d67d25ae029c18505</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__OUTPUT</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>ab85ecc3de9b346085c55964af528c2f3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_INST__END_MESSAGE</name>
+ <anchorfile>tcomp__instructions_8h.html</anchorfile>
+ <anchor>a9d8a67afca5cd30b9141865525df3cc1</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_manager.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__manager_8c</filename>
+ <includes id="tcomp__manager_8h" name="tcomp_manager.h" local="yes" imported="no">tcomp_manager.h</includes>
+ <includes id="tcomp__compressordisp_8h" name="tcomp_compressordisp.h" local="yes" imported="no">tcomp_compressordisp.h</includes>
+ <includes id="tcomp__decompressordisp_8h" name="tcomp_decompressordisp.h" local="yes" imported="no">tcomp_decompressordisp.h</includes>
+ <includes id="tcomp__statehandler_8h" name="tcomp_statehandler.h" local="yes" imported="no">tcomp_statehandler.h</includes>
+ <class kind="struct">tcomp_manager_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_DMS</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>a10acc378faf5282b218afbf5ab398074</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_SMS</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>ae490c67aa3f2d2ea3e4febda1bceea4d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_CPB</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>a593b66191765907a760012dd7c1cfb90</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_manager_s</type>
+ <name>tcomp_manager_t</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>a2fdb922c98c0aa355479d03e8378ba61</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_manager_handle_t *</type>
+ <name>tcomp_manager_create</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>a0a40ece41efdc3a5a8594a1b62cea56a</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_compress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga5760b64e23e067e209a18a8480688493</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t output_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_decompress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga821375d468c0baa3581a6d19ecb76c2f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_getNextStreamMessage</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac075422d0661cad2559083e6a700b78f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_manager_provideCompartmentId</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gaaa9bcc86de2877a1fd8070154985d83f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_manager_closeCompartment</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad7a281742f5bde5ce1f7a25071f38944</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setDecompression_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac19567fc1105a2c6e6458354f95b61d1</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t dms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setState_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gabc8ca6c18fe8574f2d87380c68d5b6a5</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t sms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setCycles_Per_Bit</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8b5db5469830967d9fe3bedbe07425ef</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t cpb)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setSigComp_Version</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad98c7dc09af9202e928a4754fc30f257</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t version)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga4da0272938736caa99f328aea5fd7b21</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_removeCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac8f21e909564d587f73e1402d07eb453</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addSipSdpDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8e18b881be5fcfb412fb71fdaeb82e58</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addPresenceDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga6093219506324383c563ae8f4caece46</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_manager_def_t</name>
+ <anchorfile>tcomp__manager_8c.html</anchorfile>
+ <anchor>ae27284b8b16fc1ba5ee706bedf9ad7c6</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_manager.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__manager_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <includes id="tcomp__compressor_8h" name="tcomp_compressor.h" local="yes" imported="no">tcomp_compressor.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_manager_compressUDP</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>a570970dc506d989d79071a7c2f5e07c4</anchor>
+ <arglist>(handle, compartmentId, compartmentIdSize, input_ptr, input_size, output_ptr, output_size)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_manager_compressTCP</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>ab619ca0e78051260d92fabce070350b2</anchor>
+ <arglist>(handle, compartmentId, compartmentIdSize, input_ptr, input_size, output_ptr, output_size)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_manager_compressSCTP</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>a0036702a43866b46d1916c42ebfc1a81</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tcomp_manager_handle_t *</type>
+ <name>tcomp_manager_create</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>a86df1206e8a33b741a2aca708449ad53</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tsk_size_t</type>
+ <name>tcomp_manager_compress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga5760b64e23e067e209a18a8480688493</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t output_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tsk_size_t</type>
+ <name>tcomp_manager_decompress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga821375d468c0baa3581a6d19ecb76c2f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tsk_size_t</type>
+ <name>tcomp_manager_getNextStreamMessage</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac075422d0661cad2559083e6a700b78f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API void</type>
+ <name>tcomp_manager_provideCompartmentId</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gaaa9bcc86de2877a1fd8070154985d83f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API void</type>
+ <name>tcomp_manager_closeCompartment</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad7a281742f5bde5ce1f7a25071f38944</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_setDecompression_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac19567fc1105a2c6e6458354f95b61d1</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t dms)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_setState_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gabc8ca6c18fe8574f2d87380c68d5b6a5</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t sms)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_setCycles_Per_Bit</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8b5db5469830967d9fe3bedbe07425ef</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t cpb)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_setSigComp_Version</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad98c7dc09af9202e928a4754fc30f257</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t version)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_addCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga4da0272938736caa99f328aea5fd7b21</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_removeCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac8f21e909564d587f73e1402d07eb453</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_addSipSdpDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8e18b881be5fcfb412fb71fdaeb82e58</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API int</type>
+ <name>tcomp_manager_addPresenceDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga6093219506324383c563ae8f4caece46</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TCOMP_BEGIN_DECLS typedef void</type>
+ <name>tcomp_manager_handle_t</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>aa64cf234c2c21da1dee31e1379b6927a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_manager_def_t</name>
+ <anchorfile>tcomp__manager_8h.html</anchorfile>
+ <anchor>a8560164a3e44ab1834bd769b469b99af</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_message.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__message_8c</filename>
+ <includes id="tcomp__message_8h" name="tcomp_message.h" local="yes" imported="no">tcomp_message.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>MIN_LEN</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>aa69f8dba9add1a52ce3cf7bcfafcfda0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEADER_GET_LEN</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a4921bb648bbd9a43c57c0253aa1245aa</anchor>
+ <arglist>(message)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEADER_GET_T</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a400ebf84dd990a146672f23703e7e929</anchor>
+ <arglist>(message)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEADER_IS_VALID</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>af39b225d6159e5dae8e7e87e26b0d59f</anchor>
+ <arglist>(message)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEADER_GET_DEST_VALUE</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a7bbced8470292d5082f874e1eb2deefc</anchor>
+ <arglist>(destination)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HEADER_GET_STATE_LENGTH</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a00a05d029bd609d85057149244d367de</anchor>
+ <arglist>(length)</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_message_t *</type>
+ <name>tcomp_message_create</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>af26d2b9d3125210beed8323fce43953b</anchor>
+ <arglist>(const void *input_ptr, tsk_size_t input_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>initFeedbackItem</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a3e63e4c08ae337e106f4287534c4ab3d</anchor>
+ <arglist>(tcomp_message_t *message, uint8_t **start_ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>initStateId</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a0285ac7ac39e094b4f8ca95e78683774</anchor>
+ <arglist>(tcomp_message_t *message, uint8_t **start_ptr, uint8_t state_len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>initStateful</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a2a3548b1d814d6a0ebceac5322ffd124</anchor>
+ <arglist>(tcomp_message_t *message, uint8_t **start_ptr, uint8_t *end_ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>initStateless</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a150b495ddba63a17a67750ef84724a66</anchor>
+ <arglist>(tcomp_message_t *message, uint8_t **start_ptr, uint8_t *end_ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>initNack</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a7266ef0e2119275eed84d10a75eb5e3e</anchor>
+ <arglist>(tcomp_message_t *message, uint8_t **start_ptr, uint8_t *end_ptr)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_message_def_t</name>
+ <anchorfile>tcomp__message_8c.html</anchorfile>
+ <anchor>a07e24e80145c143d56ae9b2b1d8752a0</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_message.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__message_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <includes id="tcomp__nackinfo_8h" name="tcomp_nackinfo.h" local="yes" imported="no">tcomp_nackinfo.h</includes>
+ <class kind="struct">tcomp_message_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_message_s</type>
+ <name>tcomp_message_t</name>
+ <anchorfile>tcomp__message_8h.html</anchorfile>
+ <anchor>a5b830f1437c6fa70288a90f2b45f7603</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_message_t *</type>
+ <name>tcomp_message_create</name>
+ <anchorfile>tcomp__message_8h.html</anchorfile>
+ <anchor>af26d2b9d3125210beed8323fce43953b</anchor>
+ <arglist>(const void *input_ptr, tsk_size_t input_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_message_def_t</name>
+ <anchorfile>tcomp__message_8h.html</anchorfile>
+ <anchor>aac047410ea3d49e2b2734895872b5ff3</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_nack_codes.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__nack__codes_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_STATE_NOT_FOUND</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a132d6009341781111040a2ff44eca186</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_CYCLES_EXHAUSTED</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a12de9059500da9cdc50dded34e429ccf</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_USER_REQUESTED</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a9ce6e9b059b8a30ba43d1eea343fe4dc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_SEGFAULT</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>aca772e3713b6b18347505558c6c23578</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_TOO_MANY_STATE_REQUESTS</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a47ef11a53de6f61f0620faafbae181db</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_STATE_ID_LENGTH</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a07817a5622f000dec7c65b5b5e9c9f66</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_STATE_PRIORITY</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>acaa79bcea57de39f556720dec4672ba6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_OUTPUT_OVERFLOW</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a441cda20cade4376bb125245fb12356a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_STACK_UNDERFLOW</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a02a4cbf10336792a107dc442f4e4c136</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_BAD_INPUT_BITORDER</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>af516c66cb1d615f1e9e6f7ed8505e096</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_DIV_BY_ZERO</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>acdb06f37c8d5e1ec55fa8b6079b0a02b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_SWITCH_VALUE_TOO_HIGH</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a2ae7fb183dfa36b2199bc24d9e415d27</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_TOO_MANY_BITS_REQUESTED</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a795c409a358eee9b6b9f4683c5e60e8d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_OPERAND</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>af115710c2db389d60caa817920aff076</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_HUFFMAN_NO_MATCH</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a43b660ff844d06fef8ec56d1ccce3fe1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_MESSAGE_TOO_SHORT</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>ac0a1f67963f89adab0198d9309a38cc7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_CODE_LOCATION</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>af731179ac19a8910ecd232a48a1a5b2c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_BYTECODES_TOO_LARGE</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a63be220eddfc73fe58bb7fb10a843601</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_OPCODE</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a51f8e2f525b1f894239a3413cabacc47</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INVALID_STATE_PROBE</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>ae957d38af5fe3b8ba8d7161a08f7ded7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_ID_NOT_UNIQUE</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>aa2b88c2a62edd1dc21a3ff5e8ea169ae</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_MULTILOAD_OVERWRITTEN</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>aef41697967b938070221a24b966ac5cf</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_STATE_TOO_SHORT</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a160ac42931b810b56de01aab88abf5a7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_INTERNAL_ERROR</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>a065b44c6b3f81d9bae36bffcb0f2a281</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_FRAMING_ERROR</name>
+ <anchorfile>tcomp__nack__codes_8h.html</anchorfile>
+ <anchor>aedc7714f5968c6499ebb8916ad4e2d2b</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_nackinfo.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__nackinfo_8c</filename>
+ <includes id="tcomp__nackinfo_8h" name="tcomp_nackinfo.h" local="yes" imported="no">tcomp_nackinfo.h</includes>
+ <member kind="function">
+ <type>tcomp_nackinfo_t *</type>
+ <name>tcomp_nackinfo_create</name>
+ <anchorfile>tcomp__nackinfo_8c.html</anchorfile>
+ <anchor>a15aeba0ea0ff51dfbcdf3425161980de</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_nackinfo_def_t</name>
+ <anchorfile>tcomp__nackinfo_8c.html</anchorfile>
+ <anchor>a03d15007180cb15e356f06663a80d1fd</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_nackinfo.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__nackinfo_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <class kind="struct">tcomp_nackinfo_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_nackinfo_s</type>
+ <name>tcomp_nackinfo_t</name>
+ <anchorfile>tcomp__nackinfo_8h.html</anchorfile>
+ <anchor>a5e4c47adb9df673b58c56dfe100d421f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_nackinfo_t *</type>
+ <name>tcomp_nackinfo_create</name>
+ <anchorfile>tcomp__nackinfo_8h.html</anchorfile>
+ <anchor>a15aeba0ea0ff51dfbcdf3425161980de</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_nackinfo_def_t</name>
+ <anchorfile>tcomp__nackinfo_8h.html</anchorfile>
+ <anchor>a02525ad190981cd6558e1cbd8f23f011</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_operands.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__operands_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>UDVM_OPERAND__LITERAL</name>
+ <anchorfile>tcomp__operands_8h.html</anchorfile>
+ <anchor>a6736d29fc06229e081898fd9947d2afb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>UDVM_OPERAND__REFERENCE</name>
+ <anchorfile>tcomp__operands_8h.html</anchorfile>
+ <anchor>a9ccda951c305c748e532b1c015d9a7fd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>UDVM_OPERAND__MULTITYPE</name>
+ <anchorfile>tcomp__operands_8h.html</anchorfile>
+ <anchor>a4364310bc0f39292cebd64c53a465030</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>UDVM_OPERAND__ADDRESS</name>
+ <anchorfile>tcomp__operands_8h.html</anchorfile>
+ <anchor>a0bab53a3ef7427a869a258e39a3a0f44</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_params.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__params_8c</filename>
+ <includes id="tcomp__params_8h" name="tcomp_params.h" local="yes" imported="no">tcomp_params.h</includes>
+ <member kind="function">
+ <type>tcomp_params_t *</type>
+ <name>tcomp_params_create</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>aff79a390a86e82736c90ec7ddc8ef7c9</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_params_hasCpbDmsSms</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>ace18c1d1e6806a82d6b158b46f52cecd</anchor>
+ <arglist>(tcomp_params_t *params)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setCpbCode</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a87c3e1ad7e61f83516de439c8a186fc2</anchor>
+ <arglist>(tcomp_params_t *params, uint8_t cpbCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setCpbValue</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a81af4bc5d519490c717c741ab23480ce</anchor>
+ <arglist>(tcomp_params_t *params, uint8_t cpbValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setDmsCode</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a2acf1afd3d2e8359cbcbc771791e002b</anchor>
+ <arglist>(tcomp_params_t *params, uint8_t dmsCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setDmsValue</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a738f4e766ee0a8590623934563a9f03f</anchor>
+ <arglist>(tcomp_params_t *params, uint32_t dmsValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setSmsCode</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>aa3b641a96b532be62f6d0d33d1ef673f</anchor>
+ <arglist>(tcomp_params_t *params, uint8_t smsCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setSmsValue</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a4e2638b63b326c87cd420b5339246620</anchor>
+ <arglist>(tcomp_params_t *params, uint32_t smsValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_params_getParameters</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a636c5177d93ba294666f5dbaf34c7eb9</anchor>
+ <arglist>(tcomp_params_t *params)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setParameters</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a08f982ab89d188f14fa91746e01019ca</anchor>
+ <arglist>(tcomp_params_t *params, uint16_t sigCompParameters)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_reset</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a283700e42a675ffd9ee4debf31ddab49</anchor>
+ <arglist>(tcomp_params_t *params)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_params_def_t</name>
+ <anchorfile>tcomp__params_8c.html</anchorfile>
+ <anchor>a9226f7f4b7cc832652edf20fd8ee7966</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_params.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__params_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__types_8h" name="tcomp_types.h" local="yes" imported="no">tcomp_types.h</includes>
+ <class kind="struct">tcomp_params_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_params_s</type>
+ <name>tcomp_params_t</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>a52cddb2c0e03536034bb1b5ac879bf9b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_params_t *</type>
+ <name>tcomp_params_create</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>aff79a390a86e82736c90ec7ddc8ef7c9</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_params_hasCpbDmsSms</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>ac51d8dcb90bf338377f9475215b5ada7</anchor>
+ <arglist>(tcomp_params_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setCpbCode</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>acd7851a904ac910ad85647c365287162</anchor>
+ <arglist>(tcomp_params_t *, uint8_t _cpbCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setCpbValue</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>ab8061cf4c8ea6aa7c10a06e95faa74b7</anchor>
+ <arglist>(tcomp_params_t *, uint8_t _cpbValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setDmsCode</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>a1d5891be3add4a0027e5e106f7b25b01</anchor>
+ <arglist>(tcomp_params_t *, uint8_t _dmsCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setDmsValue</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>aaad79730b8375681195cc0fec83f92b9</anchor>
+ <arglist>(tcomp_params_t *, uint32_t _dmsValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setSmsCode</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>a19edf4c10c8e772f158865e36b0fcd57</anchor>
+ <arglist>(tcomp_params_t *, uint8_t _smsCode)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_params_setSmsValue</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>a068f841b1d144c6ee8a4c723f42f8285</anchor>
+ <arglist>(tcomp_params_t *, uint32_t _smsValue)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_params_getParameters</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>add392eb935355e8d7a14c5974087a052</anchor>
+ <arglist>(tcomp_params_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_setParameters</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>ab65938f2959229825dc6b9a6f45282bf</anchor>
+ <arglist>(tcomp_params_t *, uint16_t sigCompParameters)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_params_reset</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>ac06b28bfef8e088704a4f789f91117d1</anchor>
+ <arglist>(tcomp_params_t *)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_params_def_t</name>
+ <anchorfile>tcomp__params_8h.html</anchorfile>
+ <anchor>a3600f7ce67b12c71981e3544c89828eb</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_reqfeed.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__reqfeed_8c</filename>
+ <includes id="tcomp__reqfeed_8h" name="tcomp_reqfeed.h" local="yes" imported="no">tcomp_reqfeed.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <member kind="function">
+ <type>tcomp_reqfeed_t *</type>
+ <name>tcomp_reqfeed_create</name>
+ <anchorfile>tcomp__reqfeed_8c.html</anchorfile>
+ <anchor>aa42a159dddace38dd8ac5f3c1ee62653</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_reqfeed_reset</name>
+ <anchorfile>tcomp__reqfeed_8c.html</anchorfile>
+ <anchor>a6dee2bd65e673c13673a8d3d58eac0c2</anchor>
+ <arglist>(tcomp_reqfeed_t *feedback)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_reqfeed_def_t</name>
+ <anchorfile>tcomp__reqfeed_8c.html</anchorfile>
+ <anchor>aab91e963c2a0c9364106a93d616d574c</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_reqfeed.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__reqfeed_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <class kind="struct">tcomp_reqfeed_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_reqfeed_s</type>
+ <name>tcomp_reqfeed_t</name>
+ <anchorfile>tcomp__reqfeed_8h.html</anchorfile>
+ <anchor>ad58d4c79312b5df8e65938b5797a9d8a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_reqfeed_t *</type>
+ <name>tcomp_reqfeed_create</name>
+ <anchorfile>tcomp__reqfeed_8h.html</anchorfile>
+ <anchor>aa42a159dddace38dd8ac5f3c1ee62653</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_reqfeed_reset</name>
+ <anchorfile>tcomp__reqfeed_8h.html</anchorfile>
+ <anchor>ae376cd64cdad8d81ef03e57a5a149346</anchor>
+ <arglist>(tcomp_reqfeed_t *)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_reqfeed_def_t</name>
+ <anchorfile>tcomp__reqfeed_8h.html</anchorfile>
+ <anchor>ae1b641281723464ea33c07c917cd0352</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_result.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__result_8c</filename>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <member kind="function">
+ <type>tcomp_result_t *</type>
+ <name>tcomp_result_create</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a75b4f33c065c8a33bff2884a603f30b2</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_tempstate_to_free_t *</type>
+ <name>tcomp_tempstate_to_free_create</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a0595a1b80463b9ba61c9b4c756ff8cfc</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tcomp_result_reset</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>ae25b615864914c068829dedac9768661</anchor>
+ <arglist>(tcomp_result_t *result, tsk_bool_t isDestructor, tsk_bool_t isResetOutput)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_setOutputBuffer</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a4cd1aeca4164979683ae0b316da7c59f</anchor>
+ <arglist>(tcomp_result_t *result, void *output_ptr, tsk_size_t output_size, tsk_bool_t isStream, uint64_t streamId)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_setCompartmentId</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>abd157db3d43502310150ac5ba8cbafd1</anchor>
+ <arglist>(tcomp_result_t *result, const void *id, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_addTempStateToCreate</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a4fb2e9f9d04f140435ce7a4863ec972e</anchor>
+ <arglist>(tcomp_result_t *result, tcomp_state_t *lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t</type>
+ <name>tcomp_result_getTempStatesToCreateSize</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a30558503dcf2f741715a3d25502866d2</anchor>
+ <arglist>(const tcomp_result_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_addTempStateToFree</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a49a90ce9760b500e40dee74760e2c59b</anchor>
+ <arglist>(tcomp_result_t *result, tcomp_tempstate_to_free_t *lpDesc)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t</type>
+ <name>tcomp_result_getTempStatesToFreeSize</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a76ee9b657de6b5384bc9b47c17bafa96</anchor>
+ <arglist>(const tcomp_result_t *result)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_result_def_t</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>a3818667591ab0a590b7881bf0a793042</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_tempstate_to_free_def_t</name>
+ <anchorfile>tcomp__result_8c.html</anchorfile>
+ <anchor>aaaa7af0f2d5c7821d28103e6fd49cd44</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_result.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__result_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__state_8h" name="tcomp_state.h" local="yes" imported="no">tcomp_state.h</includes>
+ <includes id="tcomp__reqfeed_8h" name="tcomp_reqfeed.h" local="yes" imported="no">tcomp_reqfeed.h</includes>
+ <includes id="tcomp__params_8h" name="tcomp_params.h" local="yes" imported="no">tcomp_params.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <class kind="struct">tcomp_tempstate_to_free_s</class>
+ <class kind="struct">tcomp_result_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_TEMP_SATES</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>aac492d4225f8ee67192a144defd3f00e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_result_reset</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a059ee5d3c8e030734fba4cd2ff80d9e5</anchor>
+ <arglist>(result)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_result_setOutputUDPBuffer</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>ae29d72c3b8a2e72b1f753bf78e4fb83a</anchor>
+ <arglist>(result, output_ptr, output_size)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_result_setOutputTCPBuffer</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a2d2b3608d8cdbbfd9b0fff7c85d9c04c</anchor>
+ <arglist>(result, output_ptr, output_size, streamId)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_result_setOutputSCTPBuffer</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>adea3ef453be58d89425b37213a234e15</anchor>
+ <arglist>(result, output_ptr, output_size)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_tempstate_to_free_s</type>
+ <name>tcomp_tempstate_to_free_t</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>ab2631fa5e7686e230adfcc7316b22f16</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_result_s</type>
+ <name>tcomp_result_t</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a82894c74b022fc398e00ddfea27f7b27</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API tcomp_result_t *</type>
+ <name>tcomp_result_create</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a70e8b8c9e34d7320be8a0d927d65037d</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_tempstate_to_free_t *</type>
+ <name>tcomp_tempstate_to_free_create</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a0595a1b80463b9ba61c9b4c756ff8cfc</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tcomp_result_reset</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a8a62f531a26334f397679729b754f1aa</anchor>
+ <arglist>(tcomp_result_t *result, int isDestructor, int isResetOutput)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API void</type>
+ <name>tcomp_result_setOutputBuffer</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>ac78b2a60778579be64188d753f34cd8f</anchor>
+ <arglist>(tcomp_result_t *result, void *output_ptr, tsk_size_t output_size, tsk_bool_t isStream, uint64_t streamId)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSIGCOMP_API void</type>
+ <name>tcomp_result_setCompartmentId</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a830d13abdb0fd5c862aae953c365471b</anchor>
+ <arglist>(tcomp_result_t *result, const void *id, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_addTempStateToCreate</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a4fb2e9f9d04f140435ce7a4863ec972e</anchor>
+ <arglist>(tcomp_result_t *result, tcomp_state_t *lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t</type>
+ <name>tcomp_result_getTempStatesToCreateSize</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a30558503dcf2f741715a3d25502866d2</anchor>
+ <arglist>(const tcomp_result_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_result_addTempStateToFree</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a49a90ce9760b500e40dee74760e2c59b</anchor>
+ <arglist>(tcomp_result_t *result, tcomp_tempstate_to_free_t *lpDesc)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint8_t</type>
+ <name>tcomp_result_getTempStatesToFreeSize</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>a76ee9b657de6b5384bc9b47c17bafa96</anchor>
+ <arglist>(const tcomp_result_t *result)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_tempstate_to_free_def_t</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>ae5134c3378c12c8958abc01627e5dac6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_result_def_t</name>
+ <anchorfile>tcomp__result_8h.html</anchorfile>
+ <anchor>aed43d77f3b1024e3b8f2f2621a6aac9c</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_rfc3485_dictionary_sip.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__rfc3485__dictionary__sip_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_VALUE_LENGTH</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>a46e6c1833a325b412f1b90d9d3cff42f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_STATE_ADDRESS</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>ae789106efa08941eee61853b1b895e1d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_STATE_INSTRUCTION</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>a9b51704ff3f8bad008f4946276859c7b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_MINIMUM_ACCESS_LENGTH</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>aec7741538222b69014f4943c368d6452</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_IDENTIFIER_LENGTH</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>add0319732919cb3200aa30c9c9761b1e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_IDENTIFIER</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>a1d974cbbdbfccaf0ca462557cbff48fe</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC3485_DICTIONARY_SIP_VALUE</name>
+ <anchorfile>tcomp__rfc3485__dictionary__sip_8h.html</anchorfile>
+ <anchor>afd9f736f60d149d4f6c7b6fe658415dd</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_rfc5049_sip.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__rfc5049__sip_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>SIP_RFC5049_DECOMPRESSION_MEMORY_SIZE</name>
+ <anchorfile>tcomp__rfc5049__sip_8h.html</anchorfile>
+ <anchor>afea228c70438633401ce75af876c204b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SIP_RFC5049_STATE_MEMORY_SIZE</name>
+ <anchorfile>tcomp__rfc5049__sip_8h.html</anchorfile>
+ <anchor>ac46426f92491fd0f3ec4ab081c692620</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SIP_RFC5049_CYCLES_PER_BIT</name>
+ <anchorfile>tcomp__rfc5049__sip_8h.html</anchorfile>
+ <anchor>a6b85c26b54ca1af4e56dc8060f905a91</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SIP_RFC5049_SIGCOMP_VERSION</name>
+ <anchorfile>tcomp__rfc5049__sip_8h.html</anchorfile>
+ <anchor>a2a7c63da9d90ca86d8c5240246d8d5a1</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_rfc5112_dictionary_presence.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__rfc5112__dictionary__presence_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_VALUE_LENGTH</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>a416058ff6652546d05c7f3474bebb9e7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_STATE_ADDRESS</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>aff4f353ba71c9a524f06b16c1791d55f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_STATE_INSTRUCTION</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>aa38255635e19a159e4d3bbdfa45e2903</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_MINIMUM_ACCESS_LENGTH</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>ad1a4dda419eeb89b26fd7f4bd843d920</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_IDENTIFIER_LENGTH</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>afe38ec4bf3e263e04138502ccacbddd6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_IDENTIFIER</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>a68b9a76e5d681e316a61acb216a13027</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>RFC5112_DICTIONARY_PRESENCE_VALUE</name>
+ <anchorfile>tcomp__rfc5112__dictionary__presence_8h.html</anchorfile>
+ <anchor>af209ef460fd56bfddd2c961b8636d948</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_state.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__state_8c</filename>
+ <includes id="tcomp__state_8h" name="tcomp_state.h" local="yes" imported="no">tcomp_state.h</includes>
+ <member kind="function">
+ <type>tcomp_state_t *</type>
+ <name>tcomp_state_create</name>
+ <anchorfile>tcomp__state_8c.html</anchorfile>
+ <anchor>ab1d9b808b98cc614722e1b9f05c11aba</anchor>
+ <arglist>(uint16_t length, uint16_t address, uint16_t instruction, uint16_t minimum_access_length, uint16_t retention_priority)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_state_equals</name>
+ <anchorfile>tcomp__state_8c.html</anchorfile>
+ <anchor>a3d3fd6c9177e3b1eb636c659d003bf79</anchor>
+ <arglist>(const tcomp_state_t *state1, const tcomp_state_t *state2)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_state_makeValid</name>
+ <anchorfile>tcomp__state_8c.html</anchorfile>
+ <anchor>a03e88223cd551855cec74d9d52846aec</anchor>
+ <arglist>(tcomp_state_t *state)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_state_def_t</name>
+ <anchorfile>tcomp__state_8c.html</anchorfile>
+ <anchor>a1c5967de31ecec8879549467ef3a18bb</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_state.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__state_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <class kind="struct">tcomp_state_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_PARTIAL_ID_LEN_CODE</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>aee3d499dc9e1ff74689cc26ae06a0b15</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_PARTIAL_ID_LEN_VALUE</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>a5f3ebc3b848b5430dbdfb91a4e3e39cd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_GET_STATE_SIZE</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>ae43ac0c95eed7ad26bebf7d6bef9c889</anchor>
+ <arglist>(state)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_state_s</type>
+ <name>tcomp_state_t</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>a67df0787edba76e7ab0814bb350e7f77</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tcomp_state_t</type>
+ <name>tcomp_dictionary_t</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>ab386576fd112e3d2faa72357ec0402fb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_state_t *</type>
+ <name>tcomp_state_create</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>ab1d9b808b98cc614722e1b9f05c11aba</anchor>
+ <arglist>(uint16_t length, uint16_t address, uint16_t instruction, uint16_t minimum_access_length, uint16_t retention_priority)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_state_equals</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>a3d3fd6c9177e3b1eb636c659d003bf79</anchor>
+ <arglist>(const tcomp_state_t *state1, const tcomp_state_t *state2)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_state_makeValid</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>aa2181d1c22e09ed60a4d0afdb5716615</anchor>
+ <arglist>(tcomp_state_t *)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_state_def_t</name>
+ <anchorfile>tcomp__state_8h.html</anchorfile>
+ <anchor>acd942cf8e1e7ebbd2ff9cada79e0e627</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_statehandler.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__statehandler_8c</filename>
+ <includes id="tcomp__statehandler_8h" name="tcomp_statehandler.h" local="yes" imported="no">tcomp_statehandler.h</includes>
+ <includes id="tcomp__rfc5049__sip_8h" name="tcomp_rfc5049_sip.h" local="yes" imported="no">tcomp_rfc5049_sip.h</includes>
+ <includes id="tcomp__nack__codes_8h" name="tcomp_nack_codes.h" local="yes" imported="no">tcomp_nack_codes.h</includes>
+ <includes id="tcomp__dicts_8h" name="tcomp_dicts.h" local="yes" imported="no">tcomp_dicts.h</includes>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="function">
+ <type>tcomp_statehandler_t *</type>
+ <name>tcomp_statehandler_create</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>aba10fe6bff0862b9f3064901cfe10a46</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_compartment_t *</type>
+ <name>tcomp_statehandler_getCompartment</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a797699092db01a2f4db2f2f260053746</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_statehandler_deleteCompartment</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a5800845e0c96c2f1be8b3f415a7537d8</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_statehandler_compartmentExist</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a39aac43417c1c111a74679a118a58cba</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_statehandler_findState</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a73c0a026931ce0b721e1dc28943cf186</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_statehandler_handleResult</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a3c3b5ef6aada3d28e6f095f9de5c56d1</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, tcomp_result_t **lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_statehandler_handleNack</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a5ad50cd29378cf5e0412913a5b28aead</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, const tcomp_nackinfo_t *nackinfo)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_statehandler_addSipSdpDictionary</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a6c37d108c757397a4d45b26012d7da7c</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_statehandler_addPresenceDictionary</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>af8f13459ff48ebc861124c087d40bd7b</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_statehandler_def_t</name>
+ <anchorfile>tcomp__statehandler_8c.html</anchorfile>
+ <anchor>a824d0d2dee7bf65b58b11882fb3c2ad0</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_statehandler.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__statehandler_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__types_8h" name="tcomp_types.h" local="yes" imported="no">tcomp_types.h</includes>
+ <includes id="tcomp__params_8h" name="tcomp_params.h" local="yes" imported="no">tcomp_params.h</includes>
+ <includes id="tcomp__nackinfo_8h" name="tcomp_nackinfo.h" local="yes" imported="no">tcomp_nackinfo.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <includes id="tcomp__buffer_8h" name="tcomp_buffer.h" local="yes" imported="no">tcomp_buffer.h</includes>
+ <includes id="tcomp__compartment_8h" name="tcomp_compartment.h" local="yes" imported="no">tcomp_compartment.h</includes>
+ <includes id="tcomp__state_8h" name="tcomp_state.h" local="yes" imported="no">tcomp_state.h</includes>
+ <class kind="struct">tcomp_statehandler_s</class>
+ <member kind="typedef">
+ <type>TCOMP_BEGIN_DECLS struct tcomp_statehandler_s</type>
+ <name>tcomp_statehandler_t</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>acbeadf12b871d633340f8db0d4bab6b9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_statehandler_t *</type>
+ <name>tcomp_statehandler_create</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>aba10fe6bff0862b9f3064901cfe10a46</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_compartment_t *</type>
+ <name>tcomp_statehandler_getCompartment</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a797699092db01a2f4db2f2f260053746</anchor>
+ <arglist>(const tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_statehandler_deleteCompartment</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a5800845e0c96c2f1be8b3f415a7537d8</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_statehandler_compartmentExist</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a39aac43417c1c111a74679a118a58cba</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, uint64_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_statehandler_findState</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a73c0a026931ce0b721e1dc28943cf186</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, const tcomp_buffer_handle_t *partial_identifier, tcomp_state_t **lpState)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_statehandler_handleResult</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a3c3b5ef6aada3d28e6f095f9de5c56d1</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, tcomp_result_t **lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_statehandler_handleNack</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a28e289f7334f2b4541f20f9bb9f217cb</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler, const tcomp_nackinfo_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_statehandler_addSipSdpDictionary</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a6c37d108c757397a4d45b26012d7da7c</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_statehandler_addPresenceDictionary</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>af8f13459ff48ebc861124c087d40bd7b</anchor>
+ <arglist>(tcomp_statehandler_t *statehandler)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_statehandler_def_t</name>
+ <anchorfile>tcomp__statehandler_8h.html</anchorfile>
+ <anchor>a1f7c842c3c935a11555a7b5b550b9a04</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_types.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__types_8h</filename>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tcomp_states_L_t</name>
+ <anchorfile>tcomp__types_8h.html</anchorfile>
+ <anchor>ac33ce77066e58224e9fb6cc906f0b882</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tcomp_dictionaries_L_t</name>
+ <anchorfile>tcomp__types_8h.html</anchorfile>
+ <anchor>ab08d4225211c6ff4181d4edbb3ff5a51</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tcomp_compartments_L_t</name>
+ <anchorfile>tcomp__types_8h.html</anchorfile>
+ <anchor>a60f2876ffe7c49071a549062dca38f9f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tcomp_stream_buffer_L_t</name>
+ <anchorfile>tcomp__types_8h.html</anchorfile>
+ <anchor>a57014d6cc41fd5ede1999c7260f8156b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TCOMP_BEGIN_DECLS typedef tsk_list_t</type>
+ <name>tcomp_buffers_L_t</name>
+ <anchorfile>tcomp__types_8h.html</anchorfile>
+ <anchor>a527910dae1c173fcb2209bfc3a032d93</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.bytecopy.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8bytecopy_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_MEMORY_REGISTERS_PTR</name>
+ <anchorfile>tcomp__udvm_8bytecopy_8c.html</anchorfile>
+ <anchor>a61a91f9f6e2ce5e778dd238243704b87</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_self</name>
+ <anchorfile>tcomp__udvm_8bytecopy_8c.html</anchorfile>
+ <anchor>a7105b1d9f78119c8f98335bc9fab46e5</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t *destination, uint16_t source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_to</name>
+ <anchorfile>tcomp__udvm_8bytecopy_8c.html</anchorfile>
+ <anchor>a6d635123e7327e51fc053467668f89da</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t destination, const uint8_t *source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_from</name>
+ <anchorfile>tcomp__udvm_8bytecopy_8c.html</anchorfile>
+ <anchor>aa4424706a97d3b07ce20c447d6b7512a</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint8_t *destination, uint16_t source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_HEADER_RESERVED_SIZE</name>
+ <anchorfile>tcomp__udvm_8c.html</anchorfile>
+ <anchor>a4b56d9e243e2bf97293429a64d250454</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_udvm_t *</type>
+ <name>tcomp_udvm_create</name>
+ <anchorfile>tcomp__udvm_8c.html</anchorfile>
+ <anchor>a16df46fa6fa56dc28b12c3c3d2c7f4bd</anchor>
+ <arglist>(tcomp_message_t *_sigCompMessage, tcomp_statehandler_t *stateHandler, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_udvm_decompress</name>
+ <anchorfile>tcomp__udvm_8c.html</anchorfile>
+ <anchor>a02b9bb3cf2d898d80a37eab23cc24c31</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tcomp_udvm_def_t</name>
+ <anchorfile>tcomp__udvm_8c.html</anchorfile>
+ <anchor>af00e8ac0e2de8a88b47db6c6ce183ed7</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <includes id="tcomp__message_8h" name="tcomp_message.h" local="yes" imported="no">tcomp_message.h</includes>
+ <includes id="tcomp__result_8h" name="tcomp_result.h" local="yes" imported="no">tcomp_result.h</includes>
+ <includes id="tcomp__headers__index_8h" name="tcomp_headers_index.h" local="yes" imported="no">tcomp_headers_index.h</includes>
+ <includes id="tcomp__nack__codes_8h" name="tcomp_nack_codes.h" local="yes" imported="no">tcomp_nack_codes.h</includes>
+ <includes id="tcomp__statehandler_8h" name="tcomp_statehandler.h" local="yes" imported="no">tcomp_statehandler.h</includes>
+ <includes id="tcomp__instructions_8h" name="tcomp_instructions.h" local="yes" imported="no">tcomp_instructions.h</includes>
+ <class kind="struct">tcomp_udvm_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_SET_2BYTES_VAL</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>adb9b204c8be94eeba4976b43e28fa508</anchor>
+ <arglist>(position, value)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_GET_2BYTES_VAL</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>abc0f3fc7d0eb8eada7ca448e8d45374b</anchor>
+ <arglist>(position)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_DEBUG_PRINT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a5032ec60358f97e2c6c28025e9c1bc10</anchor>
+ <arglist>(size)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_GET_SIZE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a7bf31af34af1e2ada0514173e59b2bf8</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_GET_BUFFER</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ab30dc9d6a107a65876a4ea16a8fa9de5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_GET_BUFFER_AT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>af784d748dab947aab792481b4b24bb13</anchor>
+ <arglist>(position)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_udvm_createNackInfo2</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>abd366e5f7766aefe241b3a03a1baa2d8</anchor>
+ <arglist>(udvm, reasonCode)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tcomp_udvm_createNackInfo3</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ac232aae773eb94b7c1789912b17dc0fe</anchor>
+ <arglist>(udvm, reasonCode, lpDetails)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_EXEC_INST__PUSH2</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>af332769e4abbe65f37848ff4ff6657a3</anchor>
+ <arglist>(udvm)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_EXEC_INST__POP2</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>af2cbccff0846a365d0c3f7c2618c3519</anchor>
+ <arglist>(udvm)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_UDVM_EXEC_INST__JUMP2</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a2169ba3289879baf5639ed677df5f3e4</anchor>
+ <arglist>(udvm)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tcomp_udvm_s</type>
+ <name>tcomp_udvm_t</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a81a140165274fcf18781e1e0550d6ce1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tcomp_udvm_t *</type>
+ <name>tcomp_udvm_create</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a16df46fa6fa56dc28b12c3c3d2c7f4bd</anchor>
+ <arglist>(tcomp_message_t *_sigCompMessage, tcomp_statehandler_t *stateHandler, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tcomp_udvm_decompress</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a02b9bb3cf2d898d80a37eab23cc24c31</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_literal_param</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aba3b7b5e835a6b0b94d1e7431fdc9721</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_reference_param</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>af8457bd036ee98ae3eb88194b7e99a81</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_multitype_param</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a28aa1c73369d612a37aadb899f1c40ce</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_address_param</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a9127af6e5fed8885a8423e8aca9c9d8c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t memory_address_of_instruction)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_self</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a7105b1d9f78119c8f98335bc9fab46e5</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t *destination, uint16_t source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_to</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a6d635123e7327e51fc053467668f89da</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t destination, const uint8_t *source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_bytecopy_from</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aa4424706a97d3b07ce20c447d6b7512a</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint8_t *destination, uint16_t source, uint16_t tsk_size_tocopy)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_byteCopy_TempStates</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a4c7c5fef14331240f01333f65fa26d0c</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_createTempState</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a201b466c9f6fdd801b95d85217f28616</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority, int end_msg)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_udvm_createNackInfo</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aa3bdee3985967a5386d64edf78e418fb</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buffer_handle_t *lpDetails, int16_t memory_address_of_instruction)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__DECOMPRESSION_FAILURE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a180ab76639971685afcd85b1a10babac</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__AND</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a7648d6e68144c12bb243a34fd267f56e</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__OR</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ab4da42951faf649460335e6886742852</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__NOT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>acdcf12c69913e80cf161395ecc4a33dd</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__LSHIFT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aba3e450e86a072d53ce906b5ea41f97f</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__RSHIFT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a86538de0deb2b2dc310913919d380b4b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__ADD</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a3899de24f5a3dea0f3796917e0d83676</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SUBTRACT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ac133aab55e2826b388af11fc8a84e964</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MULTIPLY</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a992361183a482a98374152a74f023752</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__DIVIDE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a18dcd9621e72255eb23f48a3762d9a20</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__REMAINDER</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a6501f4e5ac88d2313261dc20527d9365</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SORT_ASCENDING</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a0e4ecc7b1d6c800e0e39f6bd3b341162</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SORT_DESCENDING</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ae1a039751a45ea6724d4c67763894df6</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SHA_1</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a34da436d0a62982ecc8e5ef01dea79da</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__LOAD</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aff253dc2b735dc84f0a99ce9d3d52a9b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MULTILOAD</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>afcd6abbc82e6f26ce30e85a08b48eb0b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__PUSH</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a87c852814a930fd041c7cfd3e6860def</anchor>
+ <arglist>(tcomp_udvm_t *udvm, int16_t value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__POP</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a12d539688e57b4c2d557b15a8c91da19</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a6c838f51794fe192e8ebbea09eff8c58</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY_LITERAL</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a4179a80e7d1d8f24c2321326e24d2cd5</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY_OFFSET</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a6c9526e3f681b45e5a3613628cb57bfd</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t offset, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MEMSET</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a32f882639d587723a0f580c6e0688a3c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t length, uint16_t start_value, uint16_t offset)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__JUMP</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a238b31bc4cf045aa805fa8f7f4a2825c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, int16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COMPARE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aa30109fa08fcff9efc60ffbac386d580</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t value_1, uint16_t value_2, uint16_t address_1, uint16_t address_2, uint16_t address_3)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__CALL</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ab29b849f7f4fe1d6bbb690732b943284</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__RETURN</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a86006ae64fdd37c8149f0fd3b12035cc</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SWITCH</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ae6af049d3325ec85c50496b7ba443ff3</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t n, uint16_t j)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__CRC</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ad71e921644a616fc8c8ea4bb939f0029</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t value, uint16_t position, uint16_t length, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_BYTES</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a1687f0bee1f33eb024d61289af9d485b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_BITS</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a63a6dea457a13925869b30338f867285</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_HUFFMAN</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ab157ab26ab4a822aa64b04e9c2ea562f</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t destination, uint16_t address, uint16_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_ACCESS</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>ada10a2b2a97b0c5345a01f9c3c3ffa22</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length, uint16_t state_begin, uint16_t state_length, uint16_t state_address, uint16_t state_instruction)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_CREATE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a5997c6bb91c7d21a1fa75c8d6c531c96</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_FREE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>a53169151997ac68e1fa04a491f8ab703</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__OUTPUT</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aff3958d7201fa9c46cb5ca48a2181a39</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t output_start, uint16_t output_length)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__END_MESSAGE</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>aec57780e7fade6291b3baeb867471f7b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t requested_feedback_location, uint16_t returned_parameters_location, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSIGCOMP_GEXTERN const tsk_object_def_t *</type>
+ <name>tcomp_udvm_def_t</name>
+ <anchorfile>tcomp__udvm_8h.html</anchorfile>
+ <anchor>acd10495089ab209d659e9c240dc25a0a</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.instructions.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8instructions_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <class kind="struct">IndexValuePair_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>F_BIT_MSB_TO_LSB</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a37bd4434265e0d4d32c34dc0bf1c0e74</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F_BIT_LSB_TO_MSB</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a7d2f1327f1e70b45cd57593731cad238</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>H_BIT_MSB_TO_LSB</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a979a627a246411f6f43bf52c79c4d126</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>H_BIT_LSB_TO_MSB</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a2a31b69aacaab5f8179b4b7bf10de238</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>CEILLINGLOG2</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ac8ecaf840dd84f010e9d34d30af8beb7</anchor>
+ <arglist>(x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>CONSUME_CYCLES</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aef3a50cd7dadc677353232158a907001</anchor>
+ <arglist>(cycles)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct IndexValuePair_s</type>
+ <name>IndexValuePair_t</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a314ecebee88e0aee0cea83588efbb741</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__DECOMPRESSION_FAILURE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a180ab76639971685afcd85b1a10babac</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__AND</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a7648d6e68144c12bb243a34fd267f56e</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__OR</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ab4da42951faf649460335e6886742852</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__NOT</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>acdcf12c69913e80cf161395ecc4a33dd</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__LSHIFT</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aba3e450e86a072d53ce906b5ea41f97f</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__RSHIFT</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a86538de0deb2b2dc310913919d380b4b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__ADD</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a3899de24f5a3dea0f3796917e0d83676</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SUBTRACT</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ac133aab55e2826b388af11fc8a84e964</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MULTIPLY</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a992361183a482a98374152a74f023752</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__DIVIDE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a18dcd9621e72255eb23f48a3762d9a20</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__REMAINDER</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a6501f4e5ac88d2313261dc20527d9365</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t operand_1, uint16_t operand_2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SORT_ASCENDING</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a0e4ecc7b1d6c800e0e39f6bd3b341162</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SORT_DESCENDING</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ae1a039751a45ea6724d4c67763894df6</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t start, uint16_t n, uint16_t k)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SHA_1</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a34da436d0a62982ecc8e5ef01dea79da</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__LOAD</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aff253dc2b735dc84f0a99ce9d3d52a9b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MULTILOAD</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>afcd6abbc82e6f26ce30e85a08b48eb0b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__PUSH</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a87c852814a930fd041c7cfd3e6860def</anchor>
+ <arglist>(tcomp_udvm_t *udvm, int16_t value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__POP</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a12d539688e57b4c2d557b15a8c91da19</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a6c838f51794fe192e8ebbea09eff8c58</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY_LITERAL</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a4179a80e7d1d8f24c2321326e24d2cd5</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t position, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COPY_OFFSET</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a6c9526e3f681b45e5a3613628cb57bfd</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t offset, uint16_t length, uint16_t destination)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__MEMSET</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a32f882639d587723a0f580c6e0688a3c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address, uint16_t length, uint16_t start_value, uint16_t offset)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__JUMP</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a238b31bc4cf045aa805fa8f7f4a2825c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, int16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__COMPARE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aa30109fa08fcff9efc60ffbac386d580</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t value_1, uint16_t value_2, uint16_t address_1, uint16_t address_2, uint16_t address_3)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__CALL</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ab29b849f7f4fe1d6bbb690732b943284</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__RETURN</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a86006ae64fdd37c8149f0fd3b12035cc</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__SWITCH</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ae6af049d3325ec85c50496b7ba443ff3</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t n, uint16_t j)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__CRC</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ad71e921644a616fc8c8ea4bb939f0029</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t value, uint16_t position, uint16_t length, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_BYTES</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a1687f0bee1f33eb024d61289af9d485b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_BITS</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a63a6dea457a13925869b30338f867285</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t length, uint16_t destination, uint16_t address)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__INPUT_HUFFMAN</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ab157ab26ab4a822aa64b04e9c2ea562f</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t destination, uint16_t address, uint16_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_ACCESS</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>ada10a2b2a97b0c5345a01f9c3c3ffa22</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length, uint16_t state_begin, uint16_t state_length, uint16_t state_address, uint16_t state_instruction)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_CREATE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a5997c6bb91c7d21a1fa75c8d6c531c96</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__STATE_FREE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>a53169151997ac68e1fa04a491f8ab703</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t partial_identifier_start, uint16_t partial_identifier_length)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__OUTPUT</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aff3958d7201fa9c46cb5ca48a2181a39</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t output_start, uint16_t output_length)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>TCOMP_UDVM_EXEC_INST__END_MESSAGE</name>
+ <anchorfile>tcomp__udvm_8instructions_8c.html</anchorfile>
+ <anchor>aec57780e7fade6291b3baeb867471f7b</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t requested_feedback_location, uint16_t returned_parameters_location, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.nack.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8nack_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_HEADER_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>a15ec29509a4a28ad21db5e2bc373e091</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_VERSION_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>af41d439880d0eee887dd37527348b6e1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_REASON_CODE_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>a16f9f852d995a0197f36936dd62dd0a3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_OPCODE_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>ae16d49f1dc390062a54a45670976dc2f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_PC_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>a8db7152c921e099beea80560ae6f0ab2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_SHA1_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>a0215f1bb730f208a9de8211ca6dc1f76</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_DETAILS_INDEX</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>a5141e54ef81314259c1009aa1d0a3208</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_udvm_createNackInfo</name>
+ <anchorfile>tcomp__udvm_8nack_8c.html</anchorfile>
+ <anchor>aa3bdee3985967a5386d64edf78e418fb</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buffer_handle_t *lpDetails, int16_t memory_address_of_instruction)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.operands.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8operands_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_literal_param</name>
+ <anchorfile>tcomp__udvm_8operands_8c.html</anchorfile>
+ <anchor>aba3b7b5e835a6b0b94d1e7431fdc9721</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_reference_param</name>
+ <anchorfile>tcomp__udvm_8operands_8c.html</anchorfile>
+ <anchor>af8457bd036ee98ae3eb88194b7e99a81</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_multitype_param</name>
+ <anchorfile>tcomp__udvm_8operands_8c.html</anchorfile>
+ <anchor>a28aa1c73369d612a37aadb899f1c40ce</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tcomp_udvm_opget_address_param</name>
+ <anchorfile>tcomp__udvm_8operands_8c.html</anchorfile>
+ <anchor>a9127af6e5fed8885a8423e8aca9c9d8c</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t memory_address_of_instruction)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tcomp_udvm.statemanagment.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tcomp__udvm_8statemanagment_8c</filename>
+ <includes id="tcomp__udvm_8h" name="tcomp_udvm.h" local="yes" imported="no">tcomp_udvm.h</includes>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_byteCopy_TempStates</name>
+ <anchorfile>tcomp__udvm_8statemanagment_8c.html</anchorfile>
+ <anchor>a4c7c5fef14331240f01333f65fa26d0c</anchor>
+ <arglist>(tcomp_udvm_t *udvm)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_udvm_createTempState</name>
+ <anchorfile>tcomp__udvm_8statemanagment_8c.html</anchorfile>
+ <anchor>a201b466c9f6fdd801b95d85217f28616</anchor>
+ <arglist>(tcomp_udvm_t *udvm, uint16_t state_length, uint16_t state_address, uint16_t state_instruction, uint16_t minimum_access_length, uint16_t state_retention_priority, int end_msg)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tinysigcomp_config.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>tinysigcomp__config_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TINYSIGCOMP_API</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a91f4e14a57c6fa32103d9f2724d7f7b8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TINYSIGCOMP_GEXTERN</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>af0b0a913503d1a7ccd5ea2d0b080b80c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_BEGIN_DECLS</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a8f9ace67902587dbb2d57ca365576af8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TCOMP_END_DECLS</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a31258ce4dc26ff064422a1f004f89ef8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>FORCE_STATIC</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>aff8ec2db7e49184b95d7bdc50523a308</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NO_GZIP</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a27b69f7a184c1d379f4b610518c17852</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_VERSION</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>aa3dd4ff77b198f4c85a9126eb19e0d79</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>NACK_MAX_HISTORY_SIZE</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a272992e8952cd316ffac7e3810822e55</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>USE_ONLY_ACKED_STATES</name>
+ <anchorfile>tinysigcomp__config_8h.html</anchorfile>
+ <anchor>a12ac66d9032d10004ec49c4b4d5e4383</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>trees.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>trees_8c</filename>
+ <includes id="deflate_8h" name="deflate.h" local="yes" imported="no">deflate.h</includes>
+ <class kind="struct">static_tree_desc_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_BL_BITS</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a8f9fea0ddde71a75c6caf59ba993ca4e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>END_BLOCK</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a1e33ae802796dae8694948b87ac62d61</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>REP_3_6</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a5d39bc5068c496733ec81b9d5543db40</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>REPZ_3_10</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a39f77126525d41c0155506e942365da8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>REPZ_11_138</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a350267bb8ca6269fac9ba06057336788</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Buf_size</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a0c0213b942f7535235cf515e8fe23bf9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DIST_CODE_LEN</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a368ebabef641e688c8f848e76b704500</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>send_code</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a46e5de3915e644d07a6ff571e7db7bfa</anchor>
+ <arglist>(s, c, tree)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>put_short</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ae76cb23c4bc3d3f80e7a7917dd538c4e</anchor>
+ <arglist>(s, w)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>send_bits</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>aea5290b53438097651a8d1c7098aa5ef</anchor>
+ <arglist>(s, value, length)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SMALLEST</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ad14f32cbc4e0d9dfc99f6a3897ee4607</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>pqremove</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>abf2ba789ae874d21ce278885758c4dcc</anchor>
+ <arglist>(s, tree, top)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>smaller</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a78d1ce835d96eb110f23c580ad7fab7c</anchor>
+ <arglist>(tree, n, m, depth)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void tr_static_init</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>abe64a455dd65fe0a67e6321ee371fcd2</anchor>
+ <arglist>((void))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void init_block</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>af75a7af96f53e3152d3f50ca52a7853d</anchor>
+ <arglist>((deflate_state *s))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void pqdownheap</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ab92e26169a5759daa001ec2e76a2643a</anchor>
+ <arglist>((deflate_state *s, ct_data *tree, int k))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void gen_bitlen</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>af9351d2c46b32565d5cf1e7bc1ef5141</anchor>
+ <arglist>((deflate_state *s, tree_desc *desc))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void gen_codes</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a239c1b73bfca5de0e5bc1e16672baa96</anchor>
+ <arglist>((ct_data *tree, int max_code, ushf *bl_count))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void scan_tree</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ad3c361cdfe3d2a57c27124471e633d72</anchor>
+ <arglist>((deflate_state *s, ct_data *tree, int max_code))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void send_all_trees</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a6e8841ba44352e17c6d8d42fda0a58db</anchor>
+ <arglist>((deflate_state *s, int lcodes, int dcodes, int blcodes))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void compress_block</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ac7450586e0f5715477279373e4020183</anchor>
+ <arglist>((deflate_state *s, ct_data *ltree, ct_data *dtree))</arglist>
+ </member>
+ <member kind="function">
+ <type>local unsigned bi_reverse</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a6ebe72dd3504aba5d2eef6d4465534f5</anchor>
+ <arglist>((unsigned value, int length))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void copy_block</type>
+ <name>OF</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a7872aa8a931e8bd1b0e34904bae32e16</anchor>
+ <arglist>((deflate_state *s, charf *buf, unsigned len, int header))</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>tr_static_init</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>af0327179e9998353dddfef79251847d4</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tr_init</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a339961134b155099c972524109f9119b</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>init_block</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ac5265fdf07ca6c4cc57769e2fb546d55</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>pqdownheap</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a44f0c568451fbfd68a418eaddea09982</anchor>
+ <arglist>(deflate_state *s, ct_data *tree, int k)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>gen_bitlen</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a1ad07677feac279d0f161fea3891af92</anchor>
+ <arglist>(deflate_state *s, tree_desc *desc)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>gen_codes</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a599e4c4281ef721bd56222d9f01dec7c</anchor>
+ <arglist>(ct_data *tree, int max_code, ushf *bl_count)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>build_tree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ae24585b9d3230020126f1c8ae8f240f9</anchor>
+ <arglist>(deflate_state *s, tree_desc *desc)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>scan_tree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a7a7678fb5fcf9024b76f5ce22abce082</anchor>
+ <arglist>(deflate_state *s, ct_data *tree, int max_code)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>send_tree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a66b34bd277c8c1de59110a448a55b467</anchor>
+ <arglist>(deflate_state *s, ct_data *tree, int max_code)</arglist>
+ </member>
+ <member kind="function">
+ <type>local int</type>
+ <name>build_bl_tree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>aef05b1c8b7f7ef2902111a8f415ead66</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>send_all_trees</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a8e697cc571f3acaa017cbd15bc352fe5</anchor>
+ <arglist>(deflate_state *s, int lcodes, int dcodes, int blcodes)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tr_stored_block</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a9a6836d79cbfac6ba37a99d940201794</anchor>
+ <arglist>(deflate_state *s, charf *buf, ulg stored_len, int eof)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tr_align</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a728f046b1fdbb36085e368a92a0d6738</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>_tr_flush_block</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a4dca532d73a1df8ac5af0cf3ae3b079b</anchor>
+ <arglist>(deflate_state *s, charf *buf, ulg stored_len, int eof)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>_tr_tally</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a3307d897f4939a67623f4f5120bd2ec2</anchor>
+ <arglist>(deflate_state *s, unsigned dist, unsigned lc)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>compress_block</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a507733a2d56ecdb7b6d7b169f241d8ea</anchor>
+ <arglist>(deflate_state *s, ct_data *ltree, ct_data *dtree)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>set_data_type</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a0a027841f3e3745808bcf5d05287385e</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local unsigned</type>
+ <name>bi_reverse</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ac59b08248ea9953b87f375717ab8524a</anchor>
+ <arglist>(unsigned code, int len)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>bi_flush</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ab3b46873b1a7611ee2ca275cfd1c8f79</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>bi_windup</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a8532fd6b0e6cd8b6a633fe249ac4353c</anchor>
+ <arglist>(deflate_state *s)</arglist>
+ </member>
+ <member kind="function">
+ <type>local void</type>
+ <name>copy_block</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a1f3d6aa6a0147df6a48af35bcb5719d6</anchor>
+ <arglist>(deflate_state *s, charf *buf, unsigned len, int header)</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const int</type>
+ <name>extra_lbits</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a805b183476b3962fc40c42137cdea492</anchor>
+ <arglist>[LENGTH_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const int</type>
+ <name>extra_dbits</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a1b86eb7d51abdc18b72241d84013d548</anchor>
+ <arglist>[D_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const int</type>
+ <name>extra_blbits</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>adcbeeb62f98f141503fc258c65b17204</anchor>
+ <arglist>[BL_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const uch</type>
+ <name>bl_order</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a719d14ec6023beb7ec40af2e05b5b453</anchor>
+ <arglist>[BL_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local ct_data</type>
+ <name>static_ltree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a4cd63132278f666b275275d6ba45cca3</anchor>
+ <arglist>[L_CODES+2]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local ct_data</type>
+ <name>static_dtree</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a0ddc0ba781501da71ec8d54256819740</anchor>
+ <arglist>[D_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uch</type>
+ <name>_dist_code</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a9e0f7ed4c0868ed23dd3093176fb6d5b</anchor>
+ <arglist>[DIST_CODE_LEN]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uch</type>
+ <name>_length_code</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a970df3a5fad079dfda5bbc4cb6d11b42</anchor>
+ <arglist>[MAX_MATCH-MIN_MATCH+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local int</type>
+ <name>base_length</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a8d04da861714d277b95e3b45f97f4e10</anchor>
+ <arglist>[LENGTH_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local int</type>
+ <name>base_dist</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>af61be67e8bcd86435b28d981d652a6ec</anchor>
+ <arglist>[D_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local static_tree_desc</type>
+ <name>static_l_desc</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>ad553480a12b19dfb3b08e200e19a1375</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>local static_tree_desc</type>
+ <name>static_d_desc</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a716c27cf743b894c43da63a9f5e0b0c8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>local static_tree_desc</type>
+ <name>static_bl_desc</name>
+ <anchorfile>trees_8c.html</anchorfile>
+ <anchor>a5a995d10bfad4ef5f1faaac496a8aa64</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>trees.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>trees_8h</filename>
+ <member kind="variable">
+ <type>local const ct_data</type>
+ <name>static_ltree</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>a6768b3bbdf10808bdddd44b13349c5a2</anchor>
+ <arglist>[L_CODES+2]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const ct_data</type>
+ <name>static_dtree</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>a32b77d04af5dc26c5312766355386cec</anchor>
+ <arglist>[D_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>const uch</type>
+ <name>_dist_code</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>a4b07c410c27f6182d3b8404b3ae824c8</anchor>
+ <arglist>[DIST_CODE_LEN]</arglist>
+ </member>
+ <member kind="variable">
+ <type>const uch</type>
+ <name>_length_code</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>a438c19d3b28bf2456a1876d3e4f02a00</anchor>
+ <arglist>[MAX_MATCH-MIN_MATCH+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const int</type>
+ <name>base_length</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>ac443b72d29eda7b511a746eab5411199</anchor>
+ <arglist>[LENGTH_CODES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>local const int</type>
+ <name>base_dist</name>
+ <anchorfile>trees_8h.html</anchorfile>
+ <anchor>a8aa132d4ec076aeec45b2fe616ce9db9</anchor>
+ <arglist>[D_CODES]</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>zconf.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>zconf_8h</filename>
+ <includes id="tinysigcomp__config_8h" name="tinysigcomp_config.h" local="yes" imported="no">tinysigcomp_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>const</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a2c212835823e3c54a8ab6d95c652660e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_MEM_LEVEL</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a8e9fefb3d20386851ca693946127ab2e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_WBITS</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>abd2f406ac1f9c49236376115d78ccb5b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>OF</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>aa6c3c093d0900e1d96d07c91b53c1b5d</anchor>
+ <arglist>(args)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZEXTERN</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a49b7f5eccfcc99e53178581632bc9589</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZEXPORT</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a181415878f03b95a7094309d824a14b6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZEXPORTVA</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>af38d1853df635eee27f1a02f96457b22</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>FAR</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>aef060b3456fdcc093a7210a762d5f2ed</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SEEK_SET</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a0d112bae8fd35be772185b6ec6bcbe64</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SEEK_CUR</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a4c8d0b76b470ba65a43ca46a88320f39</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SEEK_END</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>ad2a2e6c114780c3071efd24f16c7f7d8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>z_off_t</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a8cf4661a88ec12823d7cbdd3fa629eb0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned char</type>
+ <name>Byte</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>ae3a497195d617519e5353ea7b417940f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned int</type>
+ <name>uInt</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a87d141052bcd5ec8a80812a565c70369</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned long</type>
+ <name>uLong</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>acd2a5701a3aecf6700d2c66c606ecb40</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>Byte FAR</type>
+ <name>Bytef</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>aeb722a888064be47e12d05f692e0f407</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>char FAR</type>
+ <name>charf</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a0f3f92a9c02f6f688bf081aabf230212</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int FAR</type>
+ <name>intf</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>aa857123283d7630b35e9b1d427dd6438</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>uInt FAR</type>
+ <name>uIntf</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>adddbe74608d318334285e01f8a56fa5a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>uLong FAR</type>
+ <name>uLongf</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a0426a5a0ed418ec4ae15af8281c64254</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>Byte const *</type>
+ <name>voidpc</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a7db54413d7060e4b57868c2b23c0ec1c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>Byte FAR *</type>
+ <name>voidpf</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>a04c731495379021454c8e61439dc88ec</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>Byte *</type>
+ <name>voidp</name>
+ <anchorfile>zconf_8h.html</anchorfile>
+ <anchor>aa3397ff439b5e076528b04bc9b8b086a</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>zlib.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>zlib_8h</filename>
+ <includes id="zconf_8h" name="zconf.h" local="yes" imported="no">zconf.h</includes>
+ <class kind="struct">z_stream_s</class>
+ <class kind="struct">gz_header_s</class>
+ <class kind="struct">internal_state</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZLIB_VERSION</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a51dc9dc65e483b3222c1f0f6a87eb76e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZLIB_VERNUM</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a6413cdfb4cdc0b5a09cf9b5f3f8f48ef</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_NO_FLUSH</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ac3b62e37b9922d9496014515acd6083a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_PARTIAL_FLUSH</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>adbd49089a5611593f05ac80c9e12cc7f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_SYNC_FLUSH</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aa32ca175522e0ef314f4dc0b0196bada</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_FULL_FLUSH</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aed4fbb038c3973aacf52fccffbc44b53</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_FINISH</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a876a626ba14eb12eea4bbf6823b6ca50</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_BLOCK</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a73e5f4c24156c63ba863014396685062</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_OK</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a8cb802b6a11e926478dc6547c514c65c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_STREAM_END</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a7d94a4a852228a899864a0053162e7a8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_NEED_DICT</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a32916ba675b2d06463da2576b6a49d64</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_ERRNO</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a3c66d64c427c0337c64e578537478737</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_STREAM_ERROR</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aad97cde83a9a4bb77f5c3b03bb68e483</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_DATA_ERROR</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a9eda83d428a71752d148f38b5dbe04f2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_MEM_ERROR</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ae2be6be871e377c6e2c25a7296ce320c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_BUF_ERROR</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a425e2f0664e1b1f75bf2bffab88d353d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_VERSION_ERROR</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a7634cdd55f955ee1be99c065c6977371</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_NO_COMPRESSION</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a496a4523776bcfa14568cd083b59f24c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_BEST_SPEED</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ad5222ae19b77c6e83815d07ca5d03fd8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_BEST_COMPRESSION</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a8db83edd9dea51f8cf0afd1727838b95</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_DEFAULT_COMPRESSION</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>af5387baee05124298e431ebe6fe96b17</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_FILTERED</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>af01ccb5a9db8d415cde987d9553ad200</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_HUFFMAN_ONLY</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a1eec3d3720ba91fd54fa08d2757c1785</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_RLE</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>af52c1220e7193d2da78332d75f9251ea</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_FIXED</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aaa5c996fbc985d5ec43f99112c0ac4a6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_DEFAULT_STRATEGY</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a580d7c2527e653ddd783109271750849</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_BINARY</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a2bfe22ed89d3553335d18a4c3cab67af</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_TEXT</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ac5c9021ac9271248094c6b93c61e1f02</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_ASCII</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a9a852d9163cdb10687403d4e79dda06e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_UNKNOWN</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a4be54d9d68d40adb73f87492284cc290</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_DEFLATED</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a27a96226f3dc88e4743131c632adf32f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Z_NULL</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ad15afa2776b41b2f4d8582dd152bd736</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>zlib_version</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a1f228220c3e6935eb171761c61487059</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>deflateInit</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ae7440c1c5a8becba6dbf410275dc0a5c</anchor>
+ <arglist>(strm, level)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>inflateInit</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ad7c6797b618699f70f61323c5184f26e</anchor>
+ <arglist>(strm)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>deflateInit2</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a59b575a521efe7ea0d3b9dd3c8d315c1</anchor>
+ <arglist>(strm, level, method, windowBits, memLevel, strategy)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>inflateInit2</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a611fc206e69f34e812ca8b590982fdd5</anchor>
+ <arglist>(strm, windowBits)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>inflateBackInit</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a9253571ea0fc77cc53c330c0411b8c19</anchor>
+ <arglist>(strm, windowBits, window)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>voidpf alloc_func</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a8614d49a5dd53697f4689073c0dbecbb</anchor>
+ <arglist>((voidpf opaque, uInt items, uInt size))</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct z_stream_s</type>
+ <name>z_stream</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>afa60092f4e0b9bc4f23b41c6930463f0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>z_stream FAR *</type>
+ <name>z_streamp</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a6ede25c84d3c9f8632305866acffb1d6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct gz_header_s</type>
+ <name>gz_header</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a2c394ffb61e707fba3c6b1a36704b305</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>gz_header FAR *</type>
+ <name>gz_headerp</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a40e9dcc294796d99b25e98fb06477fc8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>voidp</type>
+ <name>gzFile</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>acd0143ddd532551631ecc7093fd7adfc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN const char *ZEXPORT zlibVersion</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ab1bbaa8881cd84bb4d6c306e3a315241</anchor>
+ <arglist>((void))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflate</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a2e6d9561156aac56578c2f1434dc2595</anchor>
+ <arglist>((z_streamp strm, int flush))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateEnd</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aaf595349427894f1dbaff9b509791256</anchor>
+ <arglist>((z_streamp strm))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateSetDictionary</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>af4ceec9e4a1b0328f7bb73a6f423d2c0</anchor>
+ <arglist>((z_streamp strm, const Bytef *dictionary, uIntdictLength))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateCopy</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ae1a33ab7164b2fbab7683c4bea4c50c4</anchor>
+ <arglist>((z_streamp dest, z_streamp source))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateParams</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a35cdc947fd49a1bc22481945422bb97e</anchor>
+ <arglist>((z_streamp strm, int level, int strategy))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateTune</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a769be8bd85feda1b2dcb502abc010b23</anchor>
+ <arglist>((z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT deflateBound</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ab8bfcdd5ca05f2544694149a771644fa</anchor>
+ <arglist>((z_streamp strm, uLong sourceLen))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflatePrime</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a4891be63c26cb4dc463c8b2fba7e5ae2</anchor>
+ <arglist>((z_streamp strm, int bits, int value))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateSetHeader</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a77ea653416e54d2d8415fecdcfd2472c</anchor>
+ <arglist>((z_streamp strm, gz_headerp head))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT inflateBack</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a8df5cf36f8df181376ad722b2c13c8c2</anchor>
+ <arglist>((z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT compress</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a85df695aadb45de9c814f7a11f74705c</anchor>
+ <arglist>((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT compress2</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aa38fec9fd654c448681296d8bfee871a</anchor>
+ <arglist>((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT compressBound</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a4d4f28ef1b8cbd7884aa62fc9f7ab22b</anchor>
+ <arglist>((uLong sourceLen))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN gzFile ZEXPORT gzopen</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aefa7cf8ffe7d0612cce1682e8eddc033</anchor>
+ <arglist>((const char *path, const char *mode))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN gzFile ZEXPORT gzdopen</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a60335f5e60905450d17d415a99db1d0e</anchor>
+ <arglist>((int fd, const char *mode))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzsetparams</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a4bf8da17c7ec075cfbe8ba5340897cfd</anchor>
+ <arglist>((gzFile file, int level, int strategy))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzread</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>afe848f00a307b58004de5a0ed5c7a98d</anchor>
+ <arglist>((gzFile file, voidp buf, unsigned len))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzwrite</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ab8124cca4e0111abc3a089ac1fc53ecf</anchor>
+ <arglist>((gzFile file, voidpc buf, unsigned len))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORTVA gzprintf</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aa16722ec242cc8e52e5a9bcb07f6681a</anchor>
+ <arglist>((gzFile file, const char *format,...))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzputs</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>afce6ce4068efaf8d5035a06a2a8ef8d4</anchor>
+ <arglist>((gzFile file, const char *s))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN char *ZEXPORT gzgets</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aeb249b54a8b291ffedd96a0f3309d17b</anchor>
+ <arglist>((gzFile file, char *buf, int len))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzputc</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a71bf5da80bd11fd776592fc319d6305c</anchor>
+ <arglist>((gzFile file, int c))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzgetc</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a200aee6968107e38df3efcf80e9b696f</anchor>
+ <arglist>((gzFile file))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzungetc</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a731d6b0156abd7f9b38ccb8d1841f371</anchor>
+ <arglist>((int c, gzFile file))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT gzflush</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a1f60ebb9d0a34dc0246d08f8c17892e4</anchor>
+ <arglist>((gzFile file, int flush))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN z_off_t ZEXPORT gzseek</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a036580ed18d33791beb30eee4a381233</anchor>
+ <arglist>((gzFile file, z_off_t offset, int whence))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN const char *ZEXPORT gzerror</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a8719df7ce51af4f5f1b2ed8e8454a56c</anchor>
+ <arglist>((gzFile file, int *errnum))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT adler32</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a58d297b6efb8e8abf76451b5be91eac9</anchor>
+ <arglist>((uLong adler, const Bytef *buf, uInt len))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT adler32_combine</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aac77e0399fd64cf9e6467ff38b29bf80</anchor>
+ <arglist>((uLong adler1, uLong adler2, z_off_t len2))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT crc32</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a6fd2dcbf92d74eb1debc04f1ad4a7064</anchor>
+ <arglist>((uLong crc, const Bytef *buf, uInt len))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN uLong ZEXPORT crc32_combine</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a35b6e16ca9bee651ef93d8c6aeadee77</anchor>
+ <arglist>((uLong crc1, uLong crc2, z_off_t len2))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateInit_</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aee7a3a2881b7bfd06796c01120975964</anchor>
+ <arglist>((z_streamp strm, int level, const char *version, int stream_size))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT inflateInit_</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a6fd21cd770ef0aeb9689108a28c17848</anchor>
+ <arglist>((z_streamp strm, const char *version, int stream_size))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT deflateInit2_</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>ad6065a31da6d85fc705e644f578e7493</anchor>
+ <arglist>((z_streamp strm, intlevel, intmethod, int windowBits, int memLevel, int strategy, const char *version, int stream_size))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT inflateInit2_</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a2f12a7cc3ddf8face3b53e6a7df08f24</anchor>
+ <arglist>((z_streamp strm, intwindowBits, const char *version, int stream_size))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT inflateBackInit_</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a740e2f0087d5e04edd8d19fd124e0114</anchor>
+ <arglist>((z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN const char *ZEXPORT zError</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>aeb600ab48f5eefd73b51e2e9d94d40cf</anchor>
+ <arglist>((int))</arglist>
+ </member>
+ <member kind="function">
+ <type>ZEXTERN int ZEXPORT inflateSyncPoint</type>
+ <name>OF</name>
+ <anchorfile>zlib_8h.html</anchorfile>
+ <anchor>a2e797b0d60f7efb11e86f4161207d166</anchor>
+ <arglist>((z_streamp z))</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>zutil.c</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>zutil_8c</filename>
+ <includes id="zutil_8h" name="zutil.h" local="yes" imported="no">zutil.h</includes>
+ <class kind="struct">internal_state</class>
+ <member kind="function">
+ <type>const char *ZEXPORT</type>
+ <name>zlibVersion</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a705cd706dfe534aa9161a253a1c9a81a</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>uLong ZEXPORT</type>
+ <name>zlibCompileFlags</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a864d90914dbbc92e246503b147b553eb</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>const char *ZEXPORT</type>
+ <name>zError</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a43d0ecf9c894ba2ed44845a6ffc36209</anchor>
+ <arglist>(int err)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>zmemcpy</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>aaeaf4c4bfd0bbb073ce42fe420bb828a</anchor>
+ <arglist>(Bytef *dest, const Bytef *source, uInt len)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>zmemcmp</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a6590fb2f333a07dc593b873440d7c6ab</anchor>
+ <arglist>(Bytef *s1, const Bytef *s2, uInt len) const</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>zmemzero</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>ae92187bde62d7c4e84b231576d291881</anchor>
+ <arglist>(Bytef *dest, uInt len)</arglist>
+ </member>
+ <member kind="function">
+ <type>voidp malloc</type>
+ <name>OF</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>add8b03ae5c2c602b728ebb3b21931371</anchor>
+ <arglist>((uInt size))</arglist>
+ </member>
+ <member kind="function">
+ <type>voidp calloc</type>
+ <name>OF</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a2be754c5363f22e1db3e80698a568ead</anchor>
+ <arglist>((uInt items, uInt size))</arglist>
+ </member>
+ <member kind="function">
+ <type>void free</type>
+ <name>OF</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>a8f8149fe81b707d93e4b55388d11a430</anchor>
+ <arglist>((voidpf ptr))</arglist>
+ </member>
+ <member kind="function">
+ <type>voidpf</type>
+ <name>zcalloc</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>acd6de6ee77b7c44353e61511b6eb1d90</anchor>
+ <arglist>(voidpf opaque, unsigned items, unsigned size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>zcfree</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>ac5167b77f4a79cb68ba27c598b52485e</anchor>
+ <arglist>(voidpf opaque, voidpf ptr)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *const</type>
+ <name>z_errmsg</name>
+ <anchorfile>zutil_8c.html</anchorfile>
+ <anchor>ace9cfadbe3490be7fea6728608c4428d</anchor>
+ <arglist>[10]</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>zutil.h</name>
+ <path>C:/Projects/Doubango/tinySIGCOMP/src/</path>
+ <filename>zutil_8h</filename>
+ <includes id="zlib_8h" name="zlib.h" local="yes" imported="no">zlib.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZLIB_INTERNAL</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a59d4d7ef4d73655c759211ec33a5d44f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>local</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a08023ea6765c99d60a6a3840cd07156e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ERR_MSG</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a66466516a4a71f3c78ccc40d203c92e5</anchor>
+ <arglist>(err)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ERR_RETURN</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a0fcc2fe26110263e812ce50919b6a5c1</anchor>
+ <arglist>(strm, err)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEF_WBITS</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>aef084f32d9ca8b9273a1c826b89b979a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEF_MEM_LEVEL</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a19c8e60fa32d4ddf303ce988ba97af61</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>STORED_BLOCK</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a9f650bc9c1fbd9499098e3a70d295b8a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>STATIC_TREES</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a0f63a9090acfe4f653f117b638b289d1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DYN_TREES</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a40a71de753262f20a0bcacc2304e7b19</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MIN_MATCH</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a7984ceb1ff48ac91172976b91ed43f60</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MAX_MATCH</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ab7a9188dce25dac8d3a970c01b89b0c6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>PRESET_DICT</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a1156d73d88538d122acfa852b95492bd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>OS_CODE</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a919da7d9b61966c3af796ab42e618bef</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F_OPEN</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a7d40e22cfc0ad4087bf371d61290a0f5</anchor>
+ <arglist>(name, mode)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Assert</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a5c8d8d889189d1461d10df831f3cd40e</anchor>
+ <arglist>(cond, msg)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Trace</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a93bbe97269cf8304b452a4d472dba191</anchor>
+ <arglist>(x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Tracev</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a67eab10382e740297e8a59d69f85464e</anchor>
+ <arglist>(x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Tracevv</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ae65182ff511f0b12345c20b6533f32d9</anchor>
+ <arglist>(x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Tracec</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a15ce9096835263938f62694aee7a0a99</anchor>
+ <arglist>(c, x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>Tracecv</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a54a66ee51c61d67607b64678b055af6b</anchor>
+ <arglist>(c, x)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZALLOC</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a39679d03501d691bdfc62a3324cb9548</anchor>
+ <arglist>(strm, items, size)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>ZFREE</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a71d7c4f186ae3a055367c92db5a8ab18</anchor>
+ <arglist>(strm, addr)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TRY_FREE</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a8a5cef3599266dcaa129ed959a42bcf6</anchor>
+ <arglist>(s, p)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned char</type>
+ <name>uch</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>af3307af5922c72924a837559c801a8a4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>uch FAR</type>
+ <name>uchf</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>aaa6fdf02a2fdaf3731f17a19920ddb0b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned short</type>
+ <name>ush</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a3754180d606d4ed15468d15d9665aa2e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>ush FAR</type>
+ <name>ushf</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ab854e4722acf30ada8a7a71b58d1b238</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned long</type>
+ <name>ulg</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>abd6f60bf9450af2ecb94097a32c19a64</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void zmemcpy</type>
+ <name>OF</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ac40b32ad09bcfb95fa13459dd0bd44fd</anchor>
+ <arglist>((Bytef *dest, const Bytef *source, uInt len))</arglist>
+ </member>
+ <member kind="function">
+ <type>int zmemcmp</type>
+ <name>OF</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ab54c0c502433f939a51beae56b93c690</anchor>
+ <arglist>((const Bytef *s1, const Bytef *s2, uInt len))</arglist>
+ </member>
+ <member kind="function">
+ <type>void zmemzero</type>
+ <name>OF</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ac1e8b0d84844c91143ab66679c2a0441</anchor>
+ <arglist>((Bytef *dest, uInt len))</arglist>
+ </member>
+ <member kind="function">
+ <type>voidpf zcalloc</type>
+ <name>OF</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a8ddde111a12dcffe2ab5854a44f9fb23</anchor>
+ <arglist>((voidpf opaque, unsigned items, unsigned size))</arglist>
+ </member>
+ <member kind="function">
+ <type>void zcfree</type>
+ <name>OF</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>a49e951898640714825f7fbde87a1e05b</anchor>
+ <arglist>((voidpf opaque, voidpf ptr))</arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *const</type>
+ <name>z_errmsg</name>
+ <anchorfile>zutil_8h.html</anchorfile>
+ <anchor>ace9cfadbe3490be7fea6728608c4428d</anchor>
+ <arglist>[10]</arglist>
+ </member>
+ </compound>
+ <compound kind="page">
+ <name>tcomp_udp_compression_page</name>
+ <title>SigComp UDP compression</title>
+ <filename>tcomp_udp_compression_page</filename>
+ </compound>
+ <compound kind="page">
+ <name>tcomp_udp_decompression_page</name>
+ <title>SigComp UDP decompression</title>
+ <filename>tcomp_udp_decompression_page</filename>
+ </compound>
+ <compound kind="group">
+ <name>tcomp_manager_group</name>
+ <title>SigComp manager.</title>
+ <filename>group__tcomp__manager__group.html</filename>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_compress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga5760b64e23e067e209a18a8480688493</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize, const void *input_ptr, tsk_size_t input_size, void *output_ptr, tsk_size_t output_size, tsk_bool_t stream)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_decompress</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga821375d468c0baa3581a6d19ecb76c2f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *input_ptr, tsk_size_t input_size, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tcomp_manager_getNextStreamMessage</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac075422d0661cad2559083e6a700b78f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_manager_provideCompartmentId</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gaaa9bcc86de2877a1fd8070154985d83f</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_result_t *lpResult)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tcomp_manager_closeCompartment</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad7a281742f5bde5ce1f7a25071f38944</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, const void *compartmentId, tsk_size_t compartmentIdSize)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setDecompression_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac19567fc1105a2c6e6458354f95b61d1</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t dms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setState_Memory_Size</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gabc8ca6c18fe8574f2d87380c68d5b6a5</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint32_t sms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setCycles_Per_Bit</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8b5db5469830967d9fe3bedbe07425ef</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t cpb)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_setSigComp_Version</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gad98c7dc09af9202e928a4754fc30f257</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, uint8_t version)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga4da0272938736caa99f328aea5fd7b21</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_removeCompressor</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>gac8f21e909564d587f73e1402d07eb453</anchor>
+ <arglist>(tcomp_manager_handle_t *handle, tcomp_compressor_compress_f compressor)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addSipSdpDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga8e18b881be5fcfb412fb71fdaeb82e58</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tcomp_manager_addPresenceDictionary</name>
+ <anchorfile>group__tcomp__manager__group.html</anchorfile>
+ <anchor>ga6093219506324383c563ae8f4caece46</anchor>
+ <arglist>(tcomp_manager_handle_t *handle)</arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>config_s</name>
+ <filename>structconfig__s.html</filename>
+ <member kind="variable">
+ <type>ush</type>
+ <name>good_length</name>
+ <anchorfile>structconfig__s.html</anchorfile>
+ <anchor>a12e4b2a1125383087b30cb6522b71197</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>max_lazy</name>
+ <anchorfile>structconfig__s.html</anchorfile>
+ <anchor>a0910f67b3c94cbb754281a3dcdbb86b7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>nice_length</name>
+ <anchorfile>structconfig__s.html</anchorfile>
+ <anchor>afc59200fff87f1713bc9b36660fbc88e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>max_chain</name>
+ <anchorfile>structconfig__s.html</anchorfile>
+ <anchor>a8da0c5aeae38cf413453b4e2bafd57e3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>compress_func</type>
+ <name>func</name>
+ <anchorfile>structconfig__s.html</anchorfile>
+ <anchor>aa35582a2ad4899fa71fd73d730682d98</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>ct_data_s</name>
+ <filename>structct__data__s.html</filename>
+ <member kind="variable">
+ <type>union ct_data_s::@0</type>
+ <name>fc</name>
+ <anchorfile>structct__data__s.html</anchorfile>
+ <anchor>aa2b16a21e6fd8013b418fb713126ac4f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>freq</name>
+ <anchorfile>unionct__data__s_1_1@0.html</anchorfile>
+ <anchor>a149c8e4e0d6521908212876304180082</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>code</name>
+ <anchorfile>unionct__data__s_1_1@0.html</anchorfile>
+ <anchor>aae706e2e35581fc2749c42c4061172c3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>union ct_data_s::@1</type>
+ <name>dl</name>
+ <anchorfile>structct__data__s.html</anchorfile>
+ <anchor>a0ee8aa4a315dabf19b88b68f3017fbde</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>dad</name>
+ <anchorfile>unionct__data__s_1_1@1.html</anchorfile>
+ <anchor>aa141db0795588eea4ebed74db9f9e7bd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>len</name>
+ <anchorfile>unionct__data__s_1_1@1.html</anchorfile>
+ <anchor>ae3d331541f37d03a7a6b51c6ccabac9e</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>gz_header_s</name>
+ <filename>structgz__header__s.html</filename>
+ <member kind="variable">
+ <type>int</type>
+ <name>text</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>acb727b700580681a32b288d9ebc9b762</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uLong</type>
+ <name>time</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a4d66380f18f556788b252ca3bb0492a0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>xflags</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a5890059f779baab7fc72bca5e3900552</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>os</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a0c98ab56e4779bc5f994fdff60723115</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>extra</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a2b260b4b03b66af0a115704504632b68</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>extra_len</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a5ded8c4f212b31a3ad229496d74f1239</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>extra_max</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a8dcbcbd67c34445b41842b73a6d768f1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>name</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>adbc87684a91f1ff13ca81f2202630b34</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>name_max</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>af5b7779d893562b8e759efd582d4fcba</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>comment</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>ac4e81bcead752082c53d69e098298de1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>comm_max</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a6cec1c0c3a9ac1b3c0a8975e382a2b7f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>hcrc</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>ab54066d1aca7e674fbc6d5579cc48894</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>done</name>
+ <anchorfile>structgz__header__s.html</anchorfile>
+ <anchor>a5992b274cfdcacdbc1fa8347fd01ebde</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>IndexValuePair_s</name>
+ <filename>struct_index_value_pair__s.html</filename>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>index</name>
+ <anchorfile>struct_index_value_pair__s.html</anchorfile>
+ <anchor>a852b86a2eaee9852ada7a43e61e311a2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>value</name>
+ <anchorfile>struct_index_value_pair__s.html</anchorfile>
+ <anchor>a900b69af7d674b8db3bceae754b4955a</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>internal_state</name>
+ <filename>structinternal__state.html</filename>
+ <member kind="variable">
+ <type>z_streamp</type>
+ <name>strm</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a56100d9cd9199027a4ef8ea99b8165fe</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>status</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a6e27f49150e9a14580fb313cc2777e00</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>pending_buf</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>add8dff920bf5363d3293c060ccb4132b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ulg</type>
+ <name>pending_buf_size</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a8ef2d4721624a3781154877f4d576674</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>pending_out</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a197dc2c83bdda00d19744269e48f3277</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>pending</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>affd92665b1d074510ee8cfa69ae42265</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>wrap</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a49468a16361d11e78ebbfc41f2a5aa6c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>gz_headerp</type>
+ <name>gzhead</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ae4ff80e9adb2d87f1eb7f1c8194add53</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>gzindex</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a17f00293243666fb41e774190d970599</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Byte</type>
+ <name>method</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a41227eae8a136d330560407e787f2351</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>last_flush</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ab050e3e068eb034e21daa13f3d3e024e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>w_size</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a5b830ab1319a58a0ef52f902355049de</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>w_bits</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ac85d3640b140f458974c8b771fbdda04</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>w_mask</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a38b550157a9bb295a6704e7e5698e2f1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>window</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a20e3092f0de3f83b9315e5fc3d96abf1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ulg</type>
+ <name>window_size</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a71025fb69e44e6fdb31e37cfeaaa6ab2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Posf *</type>
+ <name>prev</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a801108600ea34ac568dece2e7be61600</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Posf *</type>
+ <name>head</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a643ef758b8821126405cab7927c23328</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>ins_h</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a5f63de75e2e8ff3b68f02f718e23ec5d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>hash_size</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>af257a6025a926c1ac782286f66d95a1e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>hash_bits</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a722089d43eaa7cae28a259c12979e14d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>hash_mask</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ae5b4314e1a5171e5873f70fe018af7b8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>hash_shift</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a9ec0ba01a1f947808ca393e4be491fa5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>long</type>
+ <name>block_start</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a8d5f86eed0d6045ca005fe96021deef4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>match_length</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a9d18e9a0d290188df6b22c839d7b784c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>IPos</type>
+ <name>prev_match</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a85a4927e76db64dd8ba5ce0da33d7304</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>match_available</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a45892abd08471a3734d78fed86e658e6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>strstart</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a2aefcb07963d0ec89075ad73d284be11</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>match_start</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>acd379fdd3b23383d35bff8ab081d071d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>lookahead</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ae4449747880a57274043a10cd719c617</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>prev_length</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a8c8621137ed382bdbec5a3bc213e7ade</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>max_chain_length</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a0cb72c41aa2f20d5d5da95099afd5373</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>max_lazy_match</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a05713b0262180deedb5501958802abe0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>level</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>acf4d33ee4cff36f69b924471174dcb11</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>strategy</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>acc89aafdc65ecd15f010b7c6fc295522</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>good_match</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ae99f64e663d0cf8ccd04b82891865ef7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>nice_match</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a477f14aaa7517ee48d0762b6339e404e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>struct ct_data_s</type>
+ <name>dyn_ltree</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ad516f2f1ec9134632f06790d23e2c96c</anchor>
+ <arglist>[HEAP_SIZE]</arglist>
+ </member>
+ <member kind="variable">
+ <type>struct ct_data_s</type>
+ <name>dyn_dtree</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a9b02fe2ee922fa2378deae53cfd1bd83</anchor>
+ <arglist>[2 *D_CODES+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>struct ct_data_s</type>
+ <name>bl_tree</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a709654afea8a59be597cba0d71803a8c</anchor>
+ <arglist>[2 *BL_CODES+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>struct tree_desc_s</type>
+ <name>l_desc</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>acf7b1d7f022417907661d37363028305</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>struct tree_desc_s</type>
+ <name>d_desc</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a271f5aff94bc69bc031b8b9676645aa9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>struct tree_desc_s</type>
+ <name>bl_desc</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>aa9db1fdbde1efc7bd07eb2f5b95a4a60</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>bl_count</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a9e049d031155d0cd7a8dd46d4204481a</anchor>
+ <arglist>[MAX_BITS+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>heap</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ad89d220326d796f308c1d8493dba3c94</anchor>
+ <arglist>[2 *L_CODES+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>heap_len</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a2fba52115b6829135ff5c64eaea555a6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>heap_max</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a204e9ef382f520484601f5a469fc6dbf</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uch</type>
+ <name>depth</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a933b166cb8c680e0f1534b8b3f8d0b7b</anchor>
+ <arglist>[2 *L_CODES+1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uchf *</type>
+ <name>l_buf</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>afc108fba69847767d47ad330d9637ce3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>lit_bufsize</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ac6395f717442666b3042d10c46bb9cab</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>last_lit</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ac5a9280972e00453bef446a5fa345f18</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ushf *</type>
+ <name>d_buf</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>aa02fc8ecb80a7056c744105d9ede8f92</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ulg</type>
+ <name>opt_len</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ae9197d310941ebc96f196d73ccde6764</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ulg</type>
+ <name>static_len</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a5fb6007de6c68144d7d58c5fec3c3cc2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>matches</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>accbd185909002743df649629bec6e515</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>last_eob_len</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>ac3da39014207f30bffca111b3fa8c1b3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>ush</type>
+ <name>bi_buf</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a166a631734f09a3fe307f5447f8dfe39</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>bi_valid</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>afd3692889fd372df24d04adf0ea527df</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>dummy</name>
+ <anchorfile>structinternal__state.html</anchorfile>
+ <anchor>a7c1d654b7b6114d7a0abc8d351dd1bcd</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>static_tree_desc_s</name>
+ <filename>structstatic__tree__desc__s.html</filename>
+ <member kind="variable">
+ <type>int</type>
+ <name>dummy</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>a7c1d654b7b6114d7a0abc8d351dd1bcd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const ct_data *</type>
+ <name>static_tree</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>ab685d5fd60b3dadeca7f768aa15ed032</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const intf *</type>
+ <name>extra_bits</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>afa68649c85f1bb485ba4627b325bb15d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>extra_base</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>ab00260e2abef7dc2d6bb39a107b34c0d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>elems</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>a92ca0166a5b1b021bc3b3e17af819be7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>max_length</name>
+ <anchorfile>structstatic__tree__desc__s.html</anchorfile>
+ <anchor>ad888a988cf5dcbcdbd97ad63dd32df45</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_buffer_s</name>
+ <filename>structtcomp__buffer__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>size</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a2af13611e30c0884ab2e1837c4da8282</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t *</type>
+ <name>lpbuffer</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a4e6a9aee7494cddfc58fe7300c1f247a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>index_bytes</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a8a0be01bb7eaa5a3c3497f232be8e1e5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>index_bits</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a6c3818beae16f622b3f4bb524cdb6d85</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>owner</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a63128a957ecaae32439e46f59e55043b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>P_BIT</name>
+ <anchorfile>structtcomp__buffer__s.html</anchorfile>
+ <anchor>a9a806c5ee63a025854af6eba58ea3e8c</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_compartment_s</name>
+ <filename>structtcomp__compartment__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>identifier</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>ad1813f451cfaf8c9700e6329c5ea2f2b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_states_L_t *</type>
+ <name>local_states</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>af6d33af050833129953760f824168f1b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_params_t *</type>
+ <name>remote_parameters</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a7b6120c10f2abea33a08675b54b83214</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_params_t *</type>
+ <name>local_parameters</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a4dfe3e8067c9ca543cce4a7f4a923bdb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>total_memory_size</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a790e69895499c85ab7cc3fad46592431</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>total_memory_left</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a8773de221e5a7f5d1d81d543c5fa25ad</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>lpReqFeedback</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>aa0d31da910a22850932bbadbac0ee744</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>lpRetFeedback</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a75fae69d0a3406b3b56585f6a4679a74</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TCOMP_DECLARE_COMPRESSORDATA</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a3522f99b579c5d1cbed2d604388b0991</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffers_L_t *</type>
+ <name>nacks</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>affcc6a890ca01e44e4678c4ce238c4ce</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>nacks_history_count</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a3ec80f337c5e68d7a434d9ef49bc34c6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__compartment__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_compressordisp_s</name>
+ <filename>structtcomp__compressordisp__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__compressordisp__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_compressor_compress_f</type>
+ <name>compressors</name>
+ <anchorfile>structtcomp__compressordisp__s.html</anchorfile>
+ <anchor>ab83049c7478d778de1bd99c08ac11cfa</anchor>
+ <arglist>[TCOMP_MAX_COMPRESSORS]</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tcomp_statehandler_t *</type>
+ <name>stateHandler</name>
+ <anchorfile>structtcomp__compressordisp__s.html</anchorfile>
+ <anchor>a377adfc9677811b73dbd9bd8bb87a21e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__compressordisp__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_decompressordisp_s</name>
+ <filename>structtcomp__decompressordisp__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__decompressordisp__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tcomp_statehandler_t *</type>
+ <name>stateHandler</name>
+ <anchorfile>structtcomp__decompressordisp__s.html</anchorfile>
+ <anchor>a377adfc9677811b73dbd9bd8bb87a21e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_stream_buffer_L_t *</type>
+ <name>streamBuffers</name>
+ <anchorfile>structtcomp__decompressordisp__s.html</anchorfile>
+ <anchor>a19007483d3ca8ea9762cabc14ad797ce</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__decompressordisp__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_deflatedata_s</name>
+ <filename>structtcomp__deflatedata__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_deflateStream_t</type>
+ <name>stream_1</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a6fe0d57e55ee24b973fe34309b7f8c9e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_deflateStream_t</type>
+ <name>stream_acked</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a9a176a077b51bd4c898ba0454a456cbc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>zLevel</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>ad0303c014db686f5cd57c7c5e235a0c8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>zWindowBits</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a2b4466742de3ed1fb9576b0025135a79</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>initialized</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a8ac8977c8c92fcb0ed6caa2e0d04accf</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>ghost_copy_offset</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a1fa5028a49f5ddf9154170506681c397</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_state_t *</type>
+ <name>ghostState</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a0869aba8dac1803d54d9151a66bdefcc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>stream</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>aaccd30b07977c3f95bb3a6801b82da48</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__deflatedata__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_deflateStream_s</name>
+ <filename>structtcomp__deflate_stream__s.html</filename>
+ <member kind="variable">
+ <type>z_stream</type>
+ <name>zs</name>
+ <anchorfile>structtcomp__deflate_stream__s.html</anchorfile>
+ <anchor>a20a4a45dc1eba85dfdde4fea53e1a03e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>dataWaitingAck</name>
+ <anchorfile>structtcomp__deflate_stream__s.html</anchorfile>
+ <anchor>a783a2dfccc9dc5d7a1565bae6cbced7e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>stateful</name>
+ <anchorfile>structtcomp__deflate_stream__s.html</anchorfile>
+ <anchor>a25e0ab97e1803bb2d7eaa1c40d45a382</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_manager_s</name>
+ <filename>structtcomp__manager__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__manager__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_compressordisp_t *</type>
+ <name>dispatcher_compressor</name>
+ <anchorfile>structtcomp__manager__s.html</anchorfile>
+ <anchor>ab4c1fc9443cf2ad610403a3f1b6d60ec</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_decompressordisp_t *</type>
+ <name>dispatcher_decompressor</name>
+ <anchorfile>structtcomp__manager__s.html</anchorfile>
+ <anchor>aa0bb807172258930b96c6b0798c9afe8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_statehandler_t *</type>
+ <name>stateHandler</name>
+ <anchorfile>structtcomp__manager__s.html</anchorfile>
+ <anchor>a754f0eb3a00277e15a50f7d31b4e9750</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__manager__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_message_s</name>
+ <filename>structtcomp__message__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>headerSigComp</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a322a64dd37d9f21429f74e78537e7e0d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>isOK</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>aaf906de830e4f3a60757ee41126a16ea</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>isNack</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a3bf509542952c540bf345d20fb49e6ba</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>stream_based</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>ad2395656563d506c75df9e586ae735ab</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const uint8_t *</type>
+ <name>startPtr</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a30a781db0d3f736905fc09a49f7c1f4c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>totalSize</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>ae723ec2f11cfe6af9b45ec15f2b30309</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>header_size</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>ae3015daaf39bc764154ea56e217b271f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>stateId</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>ac0522dc892c683457195c549c7c3c640</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>bytecodes_destination</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a78a5df9269ccf3bc12fe968f5b191220</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>remaining_sigcomp_buffer</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a91c75e56d0c23452345ce4d7c9603b09</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>uploaded_UDVM_buffer</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a763e84969e8cf87ffcbb0775d721a9c5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>ret_feedback_buffer</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a718e01a3640a8973a47524587c780377</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_nackinfo_t *</type>
+ <name>nack_info</name>
+ <anchorfile>structtcomp__message__s.html</anchorfile>
+ <anchor>a6691355fd42b0f7f770e2cb36aa9eeac</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_nackinfo_s</name>
+ <filename>structtcomp__nackinfo__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>version</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>ab22abc2906422da61885ac6c8e6a1a59</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>reasonCode</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>a7456084b9e87c3c655d397fe3155ae31</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>opcode</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>a5c1b56e6bccc2a95dbddf1a08e56e87d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>pc</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>af21633fb74a6aa87c93baf3caaa58864</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>sha1</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>a8091fffbbfb679a672b21a2edcf42cff</anchor>
+ <arglist>[TSK_SHA1_DIGEST_SIZE]</arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>details</name>
+ <anchorfile>structtcomp__nackinfo__s.html</anchorfile>
+ <anchor>a84cb9e7a29b0903a71ebec069d57ea16</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_params_s</name>
+ <filename>structtcomp__params__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>cpbCode</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>ac61d72ccdbffbc5f954a3e3bb4cd31cc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>dmsCode</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a1466f673e7dec55e6bdaeb731b5d3412</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>smsCode</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a7803f989e38d38fb439d0e5deabaf045</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>cpbValue</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a2e3cc7088ab1d2dcc961c40516fee1e8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>dmsValue</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a4044027f99e4d8a5c227d0d487eebbb3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>smsValue</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a12146ce0b16a2a6a972659fc7624006d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>SigComp_version</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>a3b04b3885f0d0d56d9b6fad4e8cc5acf</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffers_L_t *</type>
+ <name>returnedStates</name>
+ <anchorfile>structtcomp__params__s.html</anchorfile>
+ <anchor>ab55ca50a7082b3e99205b6cc77aae36e</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_reqfeed_s</name>
+ <filename>structtcomp__reqfeed__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__reqfeed__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>Q</name>
+ <anchorfile>structtcomp__reqfeed__s.html</anchorfile>
+ <anchor>a8244ab842968c8fefa4318505dce2e2b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>S</name>
+ <anchorfile>structtcomp__reqfeed__s.html</anchorfile>
+ <anchor>a144c5a43162033ca0ba61e313283eed8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>I</name>
+ <anchorfile>structtcomp__reqfeed__s.html</anchorfile>
+ <anchor>af09b20fe2ad9b430a57b013b0354f9ee</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>item</name>
+ <anchorfile>structtcomp__reqfeed__s.html</anchorfile>
+ <anchor>a9d757d371255e9179c6e44258a3946b1</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_result_s</name>
+ <filename>structtcomp__result__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>compartmentId</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a5a970fbb60df3ba85e39c754c14dd80e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_state_t *</type>
+ <name>statesToCreate</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>aca240e0df8f6a752d9a492022d992271</anchor>
+ <arglist>[MAX_TEMP_SATES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>statesToCreateIndex</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a9c1ccf794337faa9786351ec3e0f466b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_tempstate_to_free_t *</type>
+ <name>statesToFree</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>adee425d368286a498e26d4961be13fb6</anchor>
+ <arglist>[MAX_TEMP_SATES]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>statesToFreeIndex</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a27b4bb07826f6da1c6f475ab10c1bb4c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>streamId</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>ae5d6b8c950c0b947fc410a97ed35f7cc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>isStreamBased</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a6e42073b59f96ae1d4282d1952bedaea</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>output_buffer</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a9ec40e87d96bcd101755521b51cf5315</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_reqfeed_t *</type>
+ <name>req_feedback</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a771db0f67529cfced8222261b053049c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_params_t *</type>
+ <name>remote_parameters</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a7b6120c10f2abea33a08675b54b83214</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>ret_feedback</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a6fca330196fe190f48b8fbdfb932efc6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>isNack</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a3bf509542952c540bf345d20fb49e6ba</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>nack_info</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>a817f183ef2c1d43cd77d70dd70406382</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>consumed_cycles</name>
+ <anchorfile>structtcomp__result__s.html</anchorfile>
+ <anchor>ae3ab31f83ca5587dd03acb2ade9b810f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_state_s</name>
+ <filename>structtcomp__state__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>value</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a3bc458bf1c685c1ff5016723ea76398c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>identifier</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>aae524b3dafa5945a516fcd14fde6012f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>length</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a1892eba2086d12ac2b09005aeb09ea3b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>address</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a643d30df67a67c5915fde941c934f9f8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>instruction</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>aa9a8e88ff3c973e84e7cb5c56d89f887</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>minimum_access_length</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a8d8e3e7b3d7f8eae76daee0b97b3de67</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>retention_priority</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>ac3f4a05b52c8aa07c35fc71c9eacf16b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__state__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_statehandler_s</name>
+ <filename>structtcomp__statehandler__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_compartments_L_t *</type>
+ <name>compartments</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a8b073f4024b50ee6ca1bb6471ac22ab3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_params_t *</type>
+ <name>sigcomp_parameters</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>adfd4241f436fa6ff6e9e8c5912660bee</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_dictionaries_L_t *</type>
+ <name>dictionaries</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a9accdc69af30f1702933b8d960a578ad</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>hasSipSdpDictionary</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a9ad6d032a969c355aae2286c4af0f6e2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>hasPresenceDictionary</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a3e0975416d218f88c8fb8ae321477425</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__statehandler__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_stream_buffer_s</name>
+ <filename>structtcomp__stream__buffer__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__stream__buffer__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>id</name>
+ <anchorfile>structtcomp__stream__buffer__s.html</anchorfile>
+ <anchor>a7e290573ef1be67b92a2c745e3b00d1d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>buffer</name>
+ <anchorfile>structtcomp__stream__buffer__s.html</anchorfile>
+ <anchor>afcde768381460aba9b960c1fd35d11ab</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtcomp__stream__buffer__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_tempstate_to_free_s</name>
+ <filename>structtcomp__tempstate__to__free__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__tempstate__to__free__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>partial_identifier_start</name>
+ <anchorfile>structtcomp__tempstate__to__free__s.html</anchorfile>
+ <anchor>af0daf53e33f69671e6570adfdfba82ff</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>partial_identifier_length</name>
+ <anchorfile>structtcomp__tempstate__to__free__s.html</anchorfile>
+ <anchor>ae427caba6fe52721f5f769b6320696d2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>identifier</name>
+ <anchorfile>structtcomp__tempstate__to__free__s.html</anchorfile>
+ <anchor>aae524b3dafa5945a516fcd14fde6012f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tcomp_udvm_s</name>
+ <filename>structtcomp__udvm__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>isOK</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>aaf906de830e4f3a60757ee41126a16ea</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_message_t *</type>
+ <name>sigCompMessage</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>aa8a11b96f1dca369938fc65d46749922</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_statehandler_t *</type>
+ <name>stateHandler</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>a754f0eb3a00277e15a50f7d31b4e9750</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_result_t *</type>
+ <name>lpResult</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>abd6fbba2ff0803a1d518559492e4f387</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>maximum_UDVM_cycles</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>a00ebb3b1c30c33e4f6060fb3ffdc3d52</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>consumed_cycles</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>ae3ab31f83ca5587dd03acb2ade9b810f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tcomp_buffer_handle_t *</type>
+ <name>memory</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>ac10ddd456bab2902136a0f65aff558d9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>executionPointer</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>a3d92f1ad667088add68916888ba25e27</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint16_t</type>
+ <name>last_memory_address_of_instruction</name>
+ <anchorfile>structtcomp__udvm__s.html</anchorfile>
+ <anchor>a3140c25beb6e3887a9e5771b7cc97738</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tree_desc_s</name>
+ <filename>structtree__desc__s.html</filename>
+ <member kind="variable">
+ <type>ct_data *</type>
+ <name>dyn_tree</name>
+ <anchorfile>structtree__desc__s.html</anchorfile>
+ <anchor>ad116dfb62ac4b04ee9c1adf5d5d3209e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>max_code</name>
+ <anchorfile>structtree__desc__s.html</anchorfile>
+ <anchor>a4808321b49374743053b834929f16ba9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>static_tree_desc *</type>
+ <name>stat_desc</name>
+ <anchorfile>structtree__desc__s.html</anchorfile>
+ <anchor>ae8e86e2a7bc63a34bcaf33b4aab76562</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>z_stream_s</name>
+ <filename>structz__stream__s.html</filename>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>next_in</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a19880e07a77d10515147e23b6379dd49</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>avail_in</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a7eb50ccbfeb2368dd84c3a97f409692a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uLong</type>
+ <name>total_in</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>aa301948b62e927cb5b34c7fa48b369e7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>Bytef *</type>
+ <name>next_out</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a6926e8fa9e456364c4a931da1508662e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uInt</type>
+ <name>avail_out</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>aaf14708cee6cfc16ac27f3cff686f8d8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uLong</type>
+ <name>total_out</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>ace45f7b8af1035bc35ee7436fdd41081</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>char *</type>
+ <name>msg</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a32d2f5216cddb59c7cc8fb2806a7e727</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>struct internal_state FAR *</type>
+ <name>state</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>ac21f94cab4411ce1c77771033cff040a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>alloc_func</type>
+ <name>zalloc</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a0b2f68e949d83a93be0e4d0b88148c80</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>free_func</type>
+ <name>zfree</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a7587bb1e332fc8f57ef74071eeec8070</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>voidpf</type>
+ <name>opaque</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>afb43594753f721206f8751bdc6f311ec</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>data_type</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a47eb6f1029f8333d4e55b08296f900dd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uLong</type>
+ <name>adler</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>a74bb92610e11a5515a286f04f906d0db</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uLong</type>
+ <name>reserved</name>
+ <anchorfile>structz__stream__s.html</anchorfile>
+ <anchor>ae3bf2150b8009b089ae6878004146180</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+</tagfile>
diff --git a/tinySIGCOMP/tinySIGCOMP.vcproj b/tinySIGCOMP/tinySIGCOMP.vcproj
new file mode 100644
index 0000000..96c383f
--- /dev/null
+++ b/tinySIGCOMP/tinySIGCOMP.vcproj
@@ -0,0 +1,664 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="tinySIGCOMP"
+ ProjectGUID="{76261DC8-25B3-43F4-9FB5-112C4AC0880E}"
+ RootNamespace="tinySIGCOMP"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\thirdparties\win32\include;..\tinySAK\src"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TINYSIGCOMP_EXPORTS;DEBUG_LEVEL=DEBUG_LEVEL_INFO;_WIN32_WINNT 0x0501"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;"
+ PreprocessorDefinitions="TINYSIGCOMP_EXPORTS;DEBUG_LEVEL=DEBUG_LEVEL_INFO;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
+ MinimalRebuild="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory="%CSIDL_PROGRAM_FILES%\test"
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="false"
+ AdditionalIncludeDirectories="..\thirdparties\win32\include;..\tinySAK\src"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TINYSIGCOMP_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames="MSVCRTD"
+ GenerateDebugInformation="false"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TINYSIGCOMP_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="source"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\src\tcomp.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_manager.c"
+ >
+ </File>
+ <Filter
+ Name="zlib"
+ >
+ <File
+ RelativePath=".\src\adler32.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\compress.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\deflate.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\trees.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\zutil.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="SigCompLayer"
+ >
+ <File
+ RelativePath=".\src\tcomp_compartment.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressordata.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressordisp.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_decompressordisp.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_message.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_nackinfo.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_params.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_reqfeed.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_result.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_state.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_statehandler.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.bytecopy.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.instructions.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.nack.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.operands.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.statemanagment.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Dictionaries"
+ >
+ <File
+ RelativePath=".\src\tcomp_dicts.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Compressors"
+ >
+ <File
+ RelativePath=".\src\tcomp_compressor_deflate.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressor_dummy.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_deflatedata.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_deflatedata.ghost.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_deflatedata.zlib.c"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="include"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\src\tcomp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_headers_index.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_instructions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_manager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_nack_codes.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_operands.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_rfc5049_sip.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_types.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tinysigcomp_config.h"
+ >
+ </File>
+ <Filter
+ Name="zlib"
+ >
+ <File
+ RelativePath=".\src\deflate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\trees.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\zconf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\zlib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\zutil.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="SigCompLayer"
+ >
+ <File
+ RelativePath=".\src\tcomp_compartment.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressordata.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressordisp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_decompressordisp.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_message.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_nackinfo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_params.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_reqfeed.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_result.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_state.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_statehandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_udvm.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Dictionaries"
+ >
+ <File
+ RelativePath=".\src\tcomp_dicts.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_rfc3485_dictionary_sip.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_rfc5112_dictionary_presence.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Compressors"
+ >
+ <File
+ RelativePath=".\src\tcomp_compressor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressor_deflate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_compressor_dummy.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tcomp_deflatedata.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="asm"
+ >
+ <File
+ RelativePath=".\asm\deflate.asm"
+ >
+ </File>
+ <File
+ RelativePath=".\asm\deflate.asm.back"
+ >
+ </File>
+ <File
+ RelativePath=".\asm\dummy.asm"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
OpenPOWER on IntegriCloud