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 &body 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 output) |
generic-function |
DO: Read from the OUTPUT a value of type ENCTYPE. RETURN: The decoded list value.
(enctype-write encname enctype output value) |
generic-function |
DO: Write to the OUTPUT 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.