\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


Include dependency graph for compress.ic:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=218pt]{compress_8ic__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=109pt]{compress_8ic__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void \hyperlink{compress_8ic_a0}{LSEC\_\-compress} (\hyperlink{structLSEC__compression__}{LSEC\_\-compression} $\ast$cpr, void $\ast$ctx, unsigned sym)
\begin{CompactList}\small\item\em Encode the {\em symbol\/} using the frequency and lookup table supplied by {\em cpr\/}. \item\end{CompactList}\item 
static void \hyperlink{compress_8ic_a1}{LSEC\_\-histogram} (\hyperlink{structLSEC__compression__}{LSEC\_\-compression} $\ast$cpr, unsigned sym)
\begin{CompactList}\small\item\em Increment the bin of the histogram corresponding to val. \item\end{CompactList}\end{CompactItemize}


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

\begin{Desc}
\item[Author:]James Swain -- \href{mailto:jswain@slac.stanford.edu}{\tt jswain@slac.stanford.edu}\end{Desc}


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


Encode the {\em symbol\/} using the frequency and lookup table supplied by {\em cpr\/}. 

\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}
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\_\-check\-Compression(cpr)\hypertarget{compress_8ic_a1}{
\index{compress.ic@{compress.ic}!LSEC_histogram@{LSEC\_\-histogram}}
\index{LSEC_histogram@{LSEC\_\-histogram}!compress.ic@{compress.ic}}
\subsubsection[LSEC\_\-histogram]{\setlength{\rightskip}{0pt plus 5cm}void LSEC\_\-histogram (\hyperlink{structLSEC__compression__}{LSEC\_\-compression} $\ast$ {\em cpr}, unsigned {\em sym})\hspace{0.3cm}{\tt  \mbox{[}inline, static\mbox{]}}}}
\label{compress_8ic_a1}


Increment the bin of the histogram corresponding to val. 

\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\_\-check\-Compression(cpr)