\hypertarget{HDD_8h}{
\section{HDD.h File Reference}
\label{HDD_8h}\index{HDD.h@{HDD.h}}
}
Interface to the routines to decode a distribution of symbols previously encoded using HDE\_\-encode\-SS. 



This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=89pt]{HDD_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{HDD_8h_a0}{
typedef \_\-HDD {\bf HDD}}
\label{HDD_8h_a0}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void $\ast$ \hyperlink{HDD_8h_a1}{HDD\_\-construct} (HDD $\ast$hde, unsigned int nhuff)
\begin{CompactList}\small\item\em Constructs (initializes) the specified HDD structure. \item\end{CompactList}\item 
unsigned int \hyperlink{HDD_8h_a2}{HDD\_\-sizeof} (unsigned int nhuff)
\begin{CompactList}\small\item\em Returns the size, in bytes, for a handle to hold a Huffman distribution of {\em huffman\_\-bins\/}. \item\end{CompactList}\item 
unsigned int \hyperlink{HDD_8h_a3}{HDD\_\-decode\-S} (HDD $\ast$hdd, const unsigned int $\ast$src, unsigned int pos, unsigned int max\_\-pos, unsigned short int $\ast$syms, unsigned int nsyms)
\begin{CompactList}\small\item\em Unpacks the distribution encoded with HDD\_\-encode\-SS. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface to the routines to decode a distribution of symbols previously encoded using HDE\_\-encode\-SS. 

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


\footnotesize\begin{verbatim}   CVS $Id: HDD.h,v 1.1 2006/11/01 21:23:34 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{HDD_8h_a1}{
\index{HDD.h@{HDD.h}!HDD_construct@{HDD\_\-construct}}
\index{HDD_construct@{HDD\_\-construct}!HDD.h@{HDD.h}}
\subsubsection[HDD\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}void HDD\_\-construct (HDD $\ast$ {\em hdd}, unsigned int {\em nhuff})}}
\label{HDD_8h_a1}


Constructs (initializes) the specified HDD structure. 

\begin{Desc}
\item[Returns:]The next address after this structure.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hdd}]The HDD control structure to construct \item[{\em nhuff}]The maximum number of Huffman encoding bins that this control structure is meant to support.\end{description}
\end{Desc}
The size of this structure should be acquired by a call to HDD\_\-sizeof. The parameter {\em huffman\_\-nbins\/} must be the same in the call to HDD\_\-sizeof and HDD\_\-construct.\hypertarget{HDD_8h_a3}{
\index{HDD.h@{HDD.h}!HDD_decodeS@{HDD\_\-decodeS}}
\index{HDD_decodeS@{HDD\_\-decodeS}!HDD.h@{HDD.h}}
\subsubsection[HDD\_\-decodeS]{\setlength{\rightskip}{0pt plus 5cm}unsigned int HDD\_\-decode\-S (HDD $\ast$ {\em hdd}, const unsigned int $\ast$ {\em src}, unsigned int {\em pos}, unsigned int {\em max\_\-pos}, unsigned short int $\ast$ {\em syms}, unsigned int {\em nsyms})}}
\label{HDD_8h_a3}


Unpacks the distribution encoded with HDD\_\-encode\-SS. 

\begin{Desc}
\item[Returns:]The next bit position to read.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hdd}]The decode handle \item[{\em src}]The source stream \item[{\em pos}]The current bit read position \item[{\em max\_\-pos}]The maximum bit position, {\em i.e\/}. do not read past this point \item[{\em syms}]The array to receive the decoded symbols \item[{\em nsyms}]The number of symbols to decode\end{description}
\end{Desc}
\hypertarget{HDD_8h_a2}{
\index{HDD.h@{HDD.h}!HDD_sizeof@{HDD\_\-sizeof}}
\index{HDD_sizeof@{HDD\_\-sizeof}!HDD.h@{HDD.h}}
\subsubsection[HDD\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}unsigned int HDD\_\-sizeof (unsigned int {\em nhuff})}}
\label{HDD_8h_a2}


Returns the size, in bytes, for a handle to hold a Huffman distribution of {\em huffman\_\-bins\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nhuff}]The maximum number of Huffman codes\end{description}
\end{Desc}
For the most part, this only provides a working area. On host-based workstations with expandable stacks, this memory would go on the stack, except for the fact that it is variable length.