<?xml version="1.0"?>
<!DOCTYPE abiword PUBLIC "-//ABISOURCE//DTD AWML 1.0 Strict//EN" "http://www.abisource.com/awml.dtd">
<abiword xmlns="http://www.abisource.com/awml.dtd" xmlns:awml="http://www.abisource.com/awml.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0.1" fileformat="1.0" styles="unlocked">
<!-- =====================================================================  -->
<!-- This file is an AbiWord document.                                      -->
<!-- AbiWord is a free, Open Source word processor.                         -->
<!-- You may obtain more information about AbiWord at www.abisource.com     -->
<!-- You should not edit this file by hand.                                 -->
<!-- =====================================================================  -->

<styles>
<s type="P" name="Normal" basedon="" followedby="Current Settings" props="font-family:Times New Roman; margin-top:0pt; font-variant:normal; margin-left:0pt; text-indent:0in; widows:2; font-style:normal; font-weight:normal; text-decoration:none; color:000000; line-height:1.000000; text-align:left; margin-bottom:0pt; text-position:normal; margin-right:0pt; bgcolor:transparent; font-size:12pt; font-stretch:normal"/>
</styles>
<pagesize pagetype="Letter" orientation="portrait" width="8.500000" height="11.000000" units="in" page-scale="1.000000"/>
<section>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-style:italic">Note that this document was written before implementing the actual decompression API; there are some subtle differences between what is set out here and what has been actually implemented.</c></p>
<p style="Normal"><c props="font-weight:bold; lang:en-US"></c></p>
<p style="Normal"><c props="font-weight:bold; lang:en-US"></c><c props="font-weight:bold; lang:en-US">New Decompression API</c></p>
<p style="Normal"><c props="lang:en-US; font-weight:bold; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-style:normal">This document describes the names and arguments to the functions which will implement the new decompression API.</c><c props="lang:en-US; font-weight:normal; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal">decomp_get_dlabel(js_string *compressed, int compressed_offset)</c><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">Uncompress a dlabel from a compressed string, generating a js_string object which will store the decompressed dlabel</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Input</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">compressed: The compressed string</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">compressed_offset: The offset from the beginning of the string where the compressed dlabel begins</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Output</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">The output of this function is a newly created js_string object which contains the decompressed dlabel.  If there was any problem decompressing the dlabel in question, this routine will return a 0. </c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal">decomp_append_dlabel(js_string *compressed, js_string *uncompressed, int compressed_offset);</c><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">Get a dlabel from the compressed string, appending the uncompressed dlabel to the uncompressed string.</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Input</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">compressed: The compressed string</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">uncompressed: The partially decompressed string</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">compressed_offset: Where in the string to look (0 is the top of the string, 1 is the second byte of the string, etc.)</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Output</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">The length of the decompressed dlabel; JS_ERROR if there was an error decompressing</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal">decomp_get_rddata(js_string *compressed, js_string *uncompressed, int compressed_offset, int type, int rdlength)</c><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">Get the rddata from the compressed string, decompressing any dlabels as needed, and append the data to the uncompressed string.</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Input</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">compressed: The compressed string</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">uncompressed: The partially decompressed string</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">compressed_offset: Where in the string to look (0 is the top of the string, 1 is the second byte of the string, etc.)</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">type: The type of resource record (1 for A, 2 for NS, etc.)</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">rdlength: The rdlength this resource record should have</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none">Output</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">JS_ERROR on error, JS_SUCCESS if there was no problem processing (decompressing as needed)</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">Increase offset by </c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">rdlength </c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">after running this.</c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">decomp_get_type_etc(</c><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">js_string *compressed, js_string *uncompressed, int compressed_offset)</c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">Get the resource record type (and some other data) from the compressed string, and copy the data over to the uncompressed string.</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:italic; lang:en-US">Input</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:italic; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:italic; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">compressed: The compressed string</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">uncompressed: The partially decompressed string</c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">compressed_offset: Where in the string to look (0 is the top of the string, 1 is the second byte of the string, etc.)</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic">Output</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:italic"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">JS_ERROR on error;  RR type (0-65536) on success</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal">Increase offset by eight bytes after running this.</c><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Times New Roman; font-style:normal"></c></p>
<p style="Normal"><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal">decomp_get_rdlength(</c><c props="lang:en-US; font-weight:normal; font-family:Courier; font-style:normal"></c><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">js_string *compressed, js_string *uncompressed, int compressed_offset)</c></p>
<p style="Normal"><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">Get the resource record rdlength from the compressed string, and copy the data over to the uncompressed string.</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none">Input</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">compressed: The compressed string</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">uncompressed: The partially decompressed string</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">compressed_offset: Where in the string to look (0 is the top of the string, 1 is the second byte of the string, etc.)</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none">Output</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">JS_ERROR on error, RDLENGTH (0-65536) on success</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">decomp_get_header(js_string *compressed, js_string *uncompressed)</c><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">Get the 12 byte header for a DNS packet; making sure that qdcount (bytes 5 and 6 in big endian format) is 0 or one; and that there are no answers if qdcount is 0. </c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt">Input</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">compressed: The compressed string</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">uncompressed: The empty uncompressed string (returns error if string is not empty)</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt">Output</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">The total number of answers; -2 if there are no questions and no answers; JS_ERROR (-1) on error</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">decomp_get_question(js_string *compressed, js_string *uncompressed)</c><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">Get the question from the DNS packet; it is assumed that the question starts on the 13th byte.</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">Note that this routine does </c><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:italic; lang:en-US">not</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"> attempt to decompress the dlabel; it makes no sense to do so.</c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt">Input</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US">compressed: The compressed string</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-US"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">uncompressed:  The compressed string with only 12 bytes in it (returns error if string does not have 12 bytes)</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none">Output</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; font-size:12pt; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:italic; text-decoration:none"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">The length of the question; JS_ERROR on fatal error parsing question.</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">decomp_init(int log_level)</c><c props="font-family:Courier; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">Initialize the decompression code; set up the RRs, and set the log_level global variable in the decompression code.</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal" props="margin-top:0.0000in; margin-left:0.0000in; text-indent:0.0000in; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-US; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
</section>
</abiword>
