\hypertarget{compress_8ic}{
\section{compress.ic File Reference}
\label{compress_8ic}\index{compress.ic@{compress.ic}}
}
The histogram and compress functions, as static inlines for efficiency. 

{\tt \#include \char`\"{}compress\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/APE.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void \hyperlink{compress_8ic_7797744b3f94f0ce1b14309694cbcb90}{LSEC\_\-compress} (\hyperlink{structLSEC__compression__}{LSEC\_\-compression} $\ast$cpr, void $\ast$ctx, unsigned sym)
\begin{CompactList}\small\item\em Encode a symbol using the frequency and lookup table supplied by a compression. \item\end{CompactList}\item 
static void \hyperlink{compress_8ic_12e1ebaa5df8234460d1fea6298abd93}{LSEC\_\-histogram} (\hyperlink{structLSEC__compression__}{LSEC\_\-compression} $\ast$cpr, unsigned sym)
\begin{CompactList}\small\item\em Increment the bin of the histogram corresponding. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
The histogram and compress functions, as static inlines for efficiency. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\end{Desc}


\subsection{Function Documentation}
\hypertarget{compress_8ic_7797744b3f94f0ce1b14309694cbcb90}{
\index{compress.ic@{compress.ic}!LSEC_compress@{LSEC\_\-compress}}
\index{LSEC_compress@{LSEC\_\-compress}!compress.ic@{compress.ic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-compress ({\bf LSEC\_\-compression} $\ast$ {\em cpr}, void $\ast$ {\em ctx}, unsigned {\em sym})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{compress_8ic_7797744b3f94f0ce1b14309694cbcb90}


Encode a symbol using the frequency and lookup table supplied by a compression. 

This function does not return errors since propogation of those errors to a point in LSEC where reasonable decisions about error handling can be made is problematic. Instead, errors are latched and can be checked using LSEC\_\-checkCompression.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpr}]Pointer to an initialsed, populated and processed compression structure\item[{\em ctx}]Context, pointer to the arithmetic encoder context\item[{\em sym}]Symbol to compress \end{description}
\end{Desc}
\hypertarget{compress_8ic_12e1ebaa5df8234460d1fea6298abd93}{
\index{compress.ic@{compress.ic}!LSEC_histogram@{LSEC\_\-histogram}}
\index{LSEC_histogram@{LSEC\_\-histogram}!compress.ic@{compress.ic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogram ({\bf LSEC\_\-compression} $\ast$ {\em cpr}, unsigned {\em sym})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{compress_8ic_12e1ebaa5df8234460d1fea6298abd93}


Increment the bin of the histogram corresponding. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cpr}]Pointer to an allocated, initialised, compression structure\item[{\em sym}]Symbol to add to the histogram\end{description}
\end{Desc}
This function does not return errors since propogation of those errors to a point in LSEC where reasonable decisions about error handling can be made is problematic. Instead, errors are latched and can be checked using LSEC\_\-checkCompression. 