Package COM.INFORMATIMAGO.COMMON-LISP.DATA-ENCODING.DATA-ENCODING


This package exports functions to encode and decode data 
in a byte vector buffer.



License:

    AGPL3
    
    Copyright Pascal J. Bourguignon 2002 - 2012
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with this program.
    If not, see <http://www.gnu.org/licenses/>

(def-encrecord name-and-options &rest doc-and-fields)
macro
DO:     Defines an enctype template for a record type,
        a lisp structure with the same name,
        a reader and a writer functions.
(def-enctype name args definition)
macro
DO:     Defines an enctype template.
(enctype-instance enctype)
function
ENCTYPE: A sexp denoting the enctype.
         enctype ::= 
            (record lisp-type [:size size] (offset name enc-type)...)
            (array  element-enc-type dimensions)
            (string size ...)
            (number encoding [parameters])
            (defined-type ...)
            defined-type
RETURN:  An instance of a subclass of enctype representing the enctype.
(enctype-read encname enctype stream)
function
DO:      Read from the STREAM a value of type ENCTYPE.
RETURN:  The decoded list value.
(enctype-write encname enctype stream value)
function
DO:      Write to the STREAM a value of type ENCTYPE.
(make-enctype name args definition)
function
DO:         Makes an enctype template.
NAME:       Name of the template.
ARGS:
DEFINITION:
RETURN:     NAME
(size-of-enctype self)
generic-function
RETURN: The size in bytes of the ENCTYPE.