sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ftgzip.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* ftgzip.h
4
*
5
* Gzip-compressed stream support.
6
*
7
* Copyright (C) 2002-2025 by
8
* David Turner, Robert Wilhelm, and Werner Lemberg.
9
*
10
* This file is part of the FreeType project, and may only be used,
11
* modified, and distributed under the terms of the FreeType project
12
* license, LICENSE.TXT. By continuing to use, modify, or distribute
13
* this file you indicate that you have read the license and
14
* understand and accept it fully.
15
*
16
*/
17
18
23
#ifndef FTGZIP_H_
24
#define FTGZIP_H_
25
26
#include <
freetype/freetype.h
>
27
28
#ifdef FREETYPE_H
29
#error "freetype.h of FreeType 1 has been loaded!"
30
#error "Please fix the directory search order for header files"
31
#error "so that freetype.h of FreeType 2 is found first."
32
#endif
33
34
35
FT_BEGIN_HEADER
36
37
/**************************************************************************
38
*
39
* @section:
40
* gzip
41
*
42
* @title:
43
* GZIP Streams
44
*
45
* @abstract:
46
* Using gzip-compressed font files.
47
*
48
* @description:
49
* In certain builds of the library, gzip compression recognition is
50
* automatically handled when calling @FT_New_Face or @FT_Open_Face.
51
* This means that if no font driver is capable of handling the raw
52
* compressed file, the library will try to open a gzipped stream from it
53
* and re-open the face with it.
54
*
55
* The stream implementation is very basic and resets the decompression
56
* process each time seeking backwards is needed within the stream,
57
* which significantly undermines the performance.
58
*
59
* This section contains the declaration of Gzip-specific functions.
60
*
61
*/
62
63
64
/**************************************************************************
65
*
66
* @function:
67
* FT_Stream_OpenGzip
68
*
69
* @description:
70
* Open a new stream to parse gzip-compressed font files. This is mainly
71
* used to support the compressed `*.pcf.gz` fonts that come with
72
* XFree86.
73
*
74
* @input:
75
* stream ::
76
* The target embedding stream.
77
*
78
* source ::
79
* The source stream.
80
*
81
* @return:
82
* FreeType error code. 0~means success.
83
*
84
* @note:
85
* The source stream must be opened _before_ calling this function.
86
*
87
* Calling the internal function `FT_Stream_Close` on the new stream will
88
* **not** call `FT_Stream_Close` on the source stream. None of the
89
* stream objects will be released to the heap.
90
*
91
* This function may return `FT_Err_Unimplemented_Feature` if your build
92
* of FreeType was not compiled with zlib support.
93
*/
94
FT_EXPORT( FT_Error )
95
FT_Stream_OpenGzip( FT_Stream stream,
96
FT_Stream source );
97
98
99
/**************************************************************************
100
*
101
* @function:
102
* FT_Gzip_Uncompress
103
*
104
* @description:
105
* Decompress a zipped input buffer into an output buffer. This function
106
* is modeled after zlib's `uncompress` function.
107
*
108
* @input:
109
* memory ::
110
* A FreeType memory handle.
111
*
112
* input ::
113
* The input buffer.
114
*
115
* input_len ::
116
* The length of the input buffer.
117
*
118
* @output:
119
* output ::
120
* The output buffer.
121
*
122
* @inout:
123
* output_len ::
124
* Before calling the function, this is the total size of the output
125
* buffer, which must be large enough to hold the entire uncompressed
126
* data (so the size of the uncompressed data must be known in
127
* advance). After calling the function, `output_len` is the size of
128
* the used data in `output`.
129
*
130
* @return:
131
* FreeType error code. 0~means success.
132
*
133
* @note:
134
* This function may return `FT_Err_Unimplemented_Feature` if your build
135
* of FreeType was not compiled with zlib support.
136
*
137
* @since:
138
* 2.5.1
139
*/
140
FT_EXPORT( FT_Error )
141
FT_Gzip_Uncompress( FT_Memory memory,
142
FT_Byte* output,
143
FT_ULong* output_len,
144
const
FT_Byte* input,
145
FT_ULong input_len );
146
147
/* */
148
149
150
FT_END_HEADER
151
152
#endif
/* FTGZIP_H_ */
153
154
155
/* END */
freetype.h
freetype
include
freetype
ftgzip.h
Generated by
1.18.0