Debian Codegraph @

storage/innobase/page/zipdecompress.h

raw
1 /*****************************************************************************
2
3 Copyright (c) 2005, 2026, Oracle and/or its affiliates.
4 Copyright (c) 2012, Facebook Inc.
5
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License, version 2.0, as published by the
8 Free Software Foundation.
9
10 This program is designed to work with certain software (including
11 but not limited to OpenSSL) that is licensed under separate terms,
12 as designated in a particular file or component or in included license
13 documentation. The authors of MySQL hereby grant you an additional
14 permission to link the program and your derivative works with the
15 separately licensed software that they have either included with
16 the program or referenced in the documentation.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
21 for more details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc.,
25 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
27 *****************************************************************************/
28
29 /** @file page/zipdecompress.h
30 Compressed page interface
31
32 Created June 2005 by Marko Makela
33 *******************************************************/
34
35 /** NOTE: The functions in this file should only use functions from
36 other files in library. The code in this file is used to make a library for
37 external tools. */
38
39 #ifndef zip_decompress_h
40 #define zip_decompress_h
41
42 #include "btr0types.h"
43 #include "fil0types.h"
44 #include "page0types.h"
45
46 #include "page/page.ic"
47 #include "page/zipdecompress.ic"
48 /** Decompress a page. This function should tolerate errors on the compressed
49 page. Instead of letting assertions fail, it will return false if an
50 inconsistency is detected.
51 @return true on success, false on failure */
52 bool page_zip_decompress_low(
53 page_zip_des_t *page_zip, /*!< in: data, ssize;
54 out: m_start, m_end, m_nonempty, n_blobs */
55 page_t *page, /*!< out: uncompressed page, may be trashed */
56 bool all); /*!< in: true=decompress the whole page;
57 false=verify but do not copy some
58 page header fields that should not change
59 after page creation */
60
61 #endif