RTEMS  5.1
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 
27 
28 #ifdef __cplusplus
29 extern "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 {
50  int fd;
52  off_t offset;
53  size_t size;
54  size_t level;
55  uint8_t* buffer;
56  uint32_t read;
58 
62 static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp* comp)
63 {
64  return comp->read;
65 }
66 
76  size_t size);
77 
84 
95  rtems_rtl_obj_cache* cache,
96  int fd,
97  int compression,
98  off_t offset);
99 
115  void* buffer,
116  size_t length);
117 
118 #ifdef __cplusplus
119 }
120 #endif /* __cplusplus */
121 
122 #endif
RTEMS Run-Time Linker Object File cache buffers a section of the object file in a buffer to localise ...
rtems_rtl_obj_cache * cache
Definition: rtl-obj-comp.h:48
bool rtems_rtl_obj_comp_open(rtems_rtl_obj_comp *comp, size_t size)
Definition: rtl-obj-comp.c:37
Definition: rtl-obj-cache.h:53
struct rtems_rtl_obj_cpmp rtems_rtl_obj_comp
Definition: rtl-obj-comp.h:46
int compression
Definition: rtl-obj-comp.h:51
int fd
Definition: rtl-obj-comp.h:50
size_t level
Definition: rtl-obj-comp.h:54
size_t size
Definition: rtl-obj-comp.h:53
bool rtems_rtl_obj_comp_read(rtems_rtl_obj_comp *comp, void *buffer, size_t length)
Definition: rtl-obj-comp.c:85
void rtems_rtl_obj_comp_close(rtems_rtl_obj_comp *comp)
Definition: rtl-obj-comp.c:57
off_t offset
Definition: rtl-obj-comp.h:52
uint32_t read
Definition: rtl-obj-comp.h:56
unsigned size
Definition: tte.h:74
uint8_t * buffer
Definition: rtl-obj-comp.h:55
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