ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
msc1.h
Go to the documentation of this file.
1#ifndef __MSC1__
2#define __MSC1__
3
4/*****************************************************************************
5 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
6 *****************************************************************************
7 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *----------------------------------------------------------------------------
21 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
22 * (la "Licenza"); è proibito usare questo file se non in conformità alla
23 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
28 * il software distribuito nei termini della Licenza è distribuito
29 * "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
30 * implicite. Consultare la Licenza per il testo specifico che regola le
31 * autorizzazioni e le limitazioni previste dalla medesima.
32 ****************************************************************************/
33
34/****************************************************************************
35 * INCLUDE SECTION
36 ****************************************************************************/
37
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <limits.h>
42#include <unistd.h>
43
44/****************************************************************************
45 * DECLARATIONS AND DEFINITIONS SECTION
46 ****************************************************************************/
47
81
89
90typedef unsigned char MemoryBlock;
91
92MSC1Compressor * msc1_create( int _maximum_repeated_sequences );
93MemoryBlock * msc1_compress( MSC1Compressor * _msc1, MemoryBlock * _input, int _size, int * _output_size );
94MemoryBlock * msc1_uncompress( MSC1Compressor * _msc1, MemoryBlock * _input, int _size, int * _output_size );
95void msc1_free( MSC1Compressor * _msc1 );
96
97#endif
_MSC1CompressorState
Definition msc1.h:48
@ MSC1_CS_MOVE4
Definition msc1.h:66
@ MSC1_CS_DUPE_STORE
Definition msc1.h:69
@ MSC1_CS_DUPE_MOVE4
Definition msc1.h:72
@ MSC1_CS_LITERAL_DUPE
Definition msc1.h:63
@ MSC1_CS_DUPES
Definition msc1.h:75
@ MSC1_CS_END_OF_BLOCK
Definition msc1.h:78
@ MSC1_CS_MOVE1
Definition msc1.h:57
@ MSC1_CS_READY
Definition msc1.h:51
@ MSC1_CS_LITERAL
Definition msc1.h:60
@ MSC1_CS_STORE
Definition msc1.h:54
MSC1Compressor * msc1_create(int _maximum_repeated_sequences)
Definition msc1.c:300
void msc1_free(MSC1Compressor *_msc1)
Definition msc1.c:740
MemoryBlock * msc1_uncompress(MSC1Compressor *_msc1, MemoryBlock *_input, int _size, int *_output_size)
Definition msc1.c:746
unsigned char MemoryBlock
Definition msc1.h:90
enum _MSC1CompressorState MSC1CompressorState
struct _MSC1Compressor MSC1Compressor
MemoryBlock * msc1_compress(MSC1Compressor *_msc1, MemoryBlock *_input, int _size, int *_output_size)
Definition msc1.c:381
MSC1CompressorState state
Definition msc1.h:84
int maximumRepeatedSequences
Definition msc1.h:86