src2www, and is written by
Michal Young.
We then create a data file that is fed to a program written by
Ali Rahimi called mkhtml which produces
the actual web page and the links to the htmlified files produced by
src2www.
Creating the datafile is the difficult part of creating a repository entry (well, writing the code that gets entered in the repository might be more complicated). Here's the data file that produced the page for the huffman CODEC:
*Preamble
Title: Adaptive Huffman Encoding
Author: Josh MacDonald
AuthorURL: http://www.xcf.berkeley.edu/~jmacd
AuthorEmail: jmacd@XCF.Berkeley.EDU
Organization: XCF
OrganizationURL: http://www.xcf.berkeley.edu
Date: April 23, 1996
Purpose: This is a library for adaptive Huffman encoding, as described by Knuth
in "Dynamic Huffman Coding", Journal of Algorithms vol 6.
Portability: ANSI
PackageFname: huff.tar.gz
*Functions
FunctionCommentStart: ^\ \* %s --
FunctionCommentEnd: ^\ \*/
FunctionCommentJunk: ^[\* \t]*
Functions: Huff_Initialize_Encoder Huff_Encode_Data Huff_Get_Encoded_Bit
Huff_Initialize_Decoder Huff_Decode_Bit Huff_Decode_Data
Huff_Delete Huff_Dump_Stats
*Huff_Initialize_Encoder
Parameters: const int AlphabetSize
*Huff_Encode_Data
Parameters: HuffStruct* h, int n
*Huff_Get_Encoded_Bit
Parameters: HuffStruct* h
*Huff_Initialize_Decoder
Parameters: int AlphabetSize
Description: returns an initialized Huffman decoder for an alphabet with
the given size. returns NULL if enough memory cannot be allocated.
*Huff_Decode_Bit
Parameters: HuffStruct* h, Bit b
Description: once ReceiveBit returns 1, this retrieves an index into the
alphabet otherwise this returns 0, indicating more bits are
required.
*Huff_Decode_Data
Parameters: HuffStruct* h
Description: once ReceiveBit returns 1, this retrieves an index into the
alphabet otherwise this returns 0, indicating more bits are required.
*Huff_Delete
Parameters: HuffStruct* h
Description: deletion
*Huff_Dump_Stats
Parameters: HuffStruct* H, const char* filename, const char* description
Description: prints out the frequency of each element of the alphabet,
returns non-zero on failure.
*Types
TypeCommentStart: -
TypeCommentEnd: -
TypeCommentJunk: -
Types: HuffStruct Bit
*HuffStruct
Description: This struct has no user defined operations and is left
unspecified. It contains the state of the huffman codec
and is passed as an argument to allmost all the routines
in this package.
*Bit
Description: If you have to ask, you don't know.
*Files
Files: huff.h huff.c
*huff.h
Description: Interface
*huff.c
Description: Implementation
*Examples
Text: See the bottom of huff.c for an example.
*Generic
SectionName: Notes
Text: A test program 'compact' is compiled with -DTEST_HUFF,
which uses the algorithm to compress files. The driver is very simple
and accepts only the -d flag, and will not use the
standard io. The -d flag or calling the program under
the name uncompact will cause it to uncompress. It
writes compressed files with a .jz extensions, and always
writes out a .stats files containing the frequencies of each
character.
The file is separated into environments. The start of each environment is marked by an asterix, followed by the name of the environment. An environment contains zero or more bindings, consisting of name:value pairs.
The file is mostly self-explanatory, except perhaps for the
Files: and Functions: and
Types: lines. These are declarations for environments that
get created at run-time.