RTEMS: cpukit/include/rtems/rtl/rtl-obj-comp.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
rtl-obj-comp.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj@rtems.org>
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
23#if !defined (_RTEMS_RTL_OBJ_COMP_H_)
24#define _RTEMS_RTL_OBJ_COMP_H_
25
26#include <rtems/rtl/rtl-obj-cache.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif /* __cplusplus */
31
35#define RTEMS_RTL_DECOMP_INPUT_SIZE (256)
36
40#define RTEMS_RTL_COMP_NONE (0)
41#define RTEMS_RTL_COMP_LZ77 (1)
42
46 typedef struct rtems_rtl_obj_cpmp
47{
48 rtems_rtl_obj_cache* cache;
50 int fd;
51 int compression;
52 off_t offset;
53 size_t size;
54 size_t level;
55 uint8_t* buffer;
56 uint32_t read;
57} rtems_rtl_obj_comp;
58
62static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp* comp)
63{
64 return comp->read;
65}
66
75bool rtems_rtl_obj_comp_open (rtems_rtl_obj_comp* comp,
76 size_t size);
77
83void rtems_rtl_obj_comp_close (rtems_rtl_obj_comp* comp);
84
94void rtems_rtl_obj_comp_set (rtems_rtl_obj_comp* comp,
95 rtems_rtl_obj_cache* cache,
96 int fd,
97 int compression,
98 off_t offset);
99
114bool rtems_rtl_obj_comp_read (rtems_rtl_obj_comp* comp,
115 void* buffer,
116 size_t length);
117
118#ifdef __cplusplus
119}
120#endif /* __cplusplus */
121
122#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:85
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:70
rtems_rtl_obj_comp_close
void rtems_rtl_obj_comp_close(rtems_rtl_obj_comp *comp)
Definition: rtl-obj-comp.c:57
rtems_rtl_obj_comp_open
bool rtems_rtl_obj_comp_open(rtems_rtl_obj_comp *comp, size_t size)
Definition: rtl-obj-comp.c:37
rtems_rtl_obj_comp
struct rtems_rtl_obj_cpmp rtems_rtl_obj_comp
rtems_rtl_obj_cache
Definition: rtl-obj-cache.h:54
rtems_rtl_obj_cpmp
Definition: rtl-obj-comp.h:47
rtems_rtl_obj_cpmp::size
size_t size
Definition: rtl-obj-comp.h:53
rtems_rtl_obj_cpmp::compression
int compression
Definition: rtl-obj-comp.h:51
rtems_rtl_obj_cpmp::cache
rtems_rtl_obj_cache * cache
Definition: rtl-obj-comp.h:48
rtems_rtl_obj_cpmp::buffer
uint8_t * buffer
Definition: rtl-obj-comp.h:55
rtems_rtl_obj_cpmp::fd
int fd
Definition: rtl-obj-comp.h:50
rtems_rtl_obj_cpmp::read
uint32_t read
Definition: rtl-obj-comp.h:56
rtems_rtl_obj_cpmp::level
size_t level
Definition: rtl-obj-comp.h:54
rtems_rtl_obj_cpmp::offset
off_t offset
Definition: rtl-obj-comp.h:52