]>
git.proxmox.com Git - efi-boot-shim.git/blob - Cryptlib/OpenSSL/crypto/comp/c_rle.c
4 #include <openssl/objects.h>
5 #include <openssl/comp.h>
7 static int rle_compress_block(COMP_CTX
*ctx
, unsigned char *out
,
8 unsigned int olen
, unsigned char *in
,
10 static int rle_expand_block(COMP_CTX
*ctx
, unsigned char *out
,
11 unsigned int olen
, unsigned char *in
,
14 static COMP_METHOD rle_method
= {
25 COMP_METHOD
*COMP_rle(void)
30 static int rle_compress_block(COMP_CTX
*ctx
, unsigned char *out
,
31 unsigned int olen
, unsigned char *in
,
36 if (ilen
== 0 || olen
< (ilen
- 1)) {
37 /* ZZZZZZZZZZZZZZZZZZZZZZ */
42 memcpy(out
, in
, ilen
);
46 static int rle_expand_block(COMP_CTX
*ctx
, unsigned char *out
,
47 unsigned int olen
, unsigned char *in
,
52 if (olen
< (ilen
- 1)) {
53 /* ZZZZZZZZZZZZZZZZZZZZZZ */
59 memcpy(out
, in
, ilen
- 1);