RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
rtl
rtl-obj-comp.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
3
/*
4
* COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj@rtems.org>
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
* POSSIBILITY OF SUCH DAMAGE.
26
*/
41
42
#if !defined (_RTEMS_RTL_OBJ_COMP_H_)
43
#define _RTEMS_RTL_OBJ_COMP_H_
44
45
#include <
rtems/rtl/rtl-obj-cache.h
>
46
47
#ifdef __cplusplus
48
extern
"C"
{
49
#endif
/* __cplusplus */
50
54
#define RTEMS_RTL_DECOMP_INPUT_SIZE (256)
55
59
#define RTEMS_RTL_COMP_NONE (0)
60
#define RTEMS_RTL_COMP_LZ77 (1)
61
65
typedef
struct
rtems_rtl_obj_cpmp
66
{
67
rtems_rtl_obj_cache
*
cache
;
69
int
fd
;
70
int
compression
;
71
off_t
offset
;
72
size_t
size
;
73
size_t
level
;
74
uint8_t*
buffer
;
75
uint32_t
read
;
76
}
rtems_rtl_obj_comp
;
77
81
static
inline
uint32_t rtems_rtl_obj_comp_input (
rtems_rtl_obj_comp
* comp)
82
{
83
return
comp->
read
;
84
}
85
94
bool
rtems_rtl_obj_comp_open
(
rtems_rtl_obj_comp
* comp,
95
size_t
size);
96
102
void
rtems_rtl_obj_comp_close
(
rtems_rtl_obj_comp
* comp);
103
113
void
rtems_rtl_obj_comp_set
(
rtems_rtl_obj_comp
* comp,
114
rtems_rtl_obj_cache
* cache,
115
int
fd,
116
int
compression,
117
off_t offset);
118
133
bool
rtems_rtl_obj_comp_read
(
rtems_rtl_obj_comp
* comp,
134
void
* buffer,
135
size_t
length);
136
137
#ifdef __cplusplus
138
}
139
#endif
/* __cplusplus */
140
141
#endif
rtl-obj-cache.h
RTEMS Run-Time Linker Object File cache buffers a section of the object file in a buffer to localise ...
rtems_rtl_obj_comp_read
bool rtems_rtl_obj_comp_read(rtems_rtl_obj_comp *comp, void *buffer, size_t length)
Definition
rtl-obj-comp.c:105
rtems_rtl_obj_comp_set
void rtems_rtl_obj_comp_set(rtems_rtl_obj_comp *comp, rtems_rtl_obj_cache *cache, int fd, int compression, off_t offset)
Definition
rtl-obj-comp.c:90
rtems_rtl_obj_comp_close
void rtems_rtl_obj_comp_close(rtems_rtl_obj_comp *comp)
Definition
rtl-obj-comp.c:77
rtems_rtl_obj_comp_open
bool rtems_rtl_obj_comp_open(rtems_rtl_obj_comp *comp, size_t size)
Definition
rtl-obj-comp.c:57
rtems_rtl_obj_comp
struct rtems_rtl_obj_cpmp rtems_rtl_obj_comp
rtems_rtl_obj_cache
Definition
rtl-obj-cache.h:73
rtems_rtl_obj_cpmp
Definition
rtl-obj-comp.h:66
rtems_rtl_obj_cpmp::size
size_t size
Definition
rtl-obj-comp.h:72
rtems_rtl_obj_cpmp::compression
int compression
Definition
rtl-obj-comp.h:70
rtems_rtl_obj_cpmp::cache
rtems_rtl_obj_cache * cache
Definition
rtl-obj-comp.h:67
rtems_rtl_obj_cpmp::buffer
uint8_t * buffer
Definition
rtl-obj-comp.h:74
rtems_rtl_obj_cpmp::fd
int fd
Definition
rtl-obj-comp.h:69
rtems_rtl_obj_cpmp::read
uint32_t read
Definition
rtl-obj-comp.h:75
rtems_rtl_obj_cpmp::level
size_t level
Definition
rtl-obj-comp.h:73
rtems_rtl_obj_cpmp::offset
off_t offset
Definition
rtl-obj-comp.h:71
Generated by
1.18.0