Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
6d4a95e0
Commit
6d4a95e0
authored
Apr 08, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove parts of the libvgz API which we dont use.
parent
67f5fadd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
822 deletions
+0
-822
Makefile.am
lib/libvgz/Makefile.am
+0
-3
compress.c
lib/libvgz/compress.c
+0
-86
infback.c
lib/libvgz/infback.c
+0
-640
uncompr.c
lib/libvgz/uncompr.c
+0
-93
No files found.
lib/libvgz/Makefile.am
View file @
6d4a95e0
...
@@ -9,13 +9,11 @@ libvgz_a_CFLAGS = -D_LARGEFILE64_SOURCE=1 -DZLIB_CONST \
...
@@ -9,13 +9,11 @@ libvgz_a_CFLAGS = -D_LARGEFILE64_SOURCE=1 -DZLIB_CONST \
libvgz_a_SOURCES
=
\
libvgz_a_SOURCES
=
\
adler32.c
\
adler32.c
\
compress.c
\
crc32.c
\
crc32.c
\
crc32.h
\
crc32.h
\
deflate.c
\
deflate.c
\
deflate.h
\
deflate.h
\
gzguts.h
\
gzguts.h
\
infback.c
\
inffast.c
\
inffast.c
\
inffast.h
\
inffast.h
\
inffixed.h
\
inffixed.h
\
...
@@ -25,7 +23,6 @@ libvgz_a_SOURCES = \
...
@@ -25,7 +23,6 @@ libvgz_a_SOURCES = \
inftrees.h
\
inftrees.h
\
trees.c
\
trees.c
\
trees.h
\
trees.h
\
uncompr.c
\
zconf.h
\
zconf.h
\
vgz.h
\
vgz.h
\
zutil.c
\
zutil.c
\
...
...
lib/libvgz/compress.c
deleted
100644 → 0
View file @
67f5fadd
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#define ZLIB_INTERNAL
#include "vgz.h"
/* ===========================================================================
Compresses the source buffer into the destination buffer. The level
parameter has the same meaning as in deflateInit. sourceLen is the byte
length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least 0.1% larger than sourceLen plus
12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
int
ZEXPORT
compress2
(
dest
,
destLen
,
source
,
sourceLen
,
level
)
Bytef
*
dest
;
uLongf
*
destLen
;
const
Bytef
*
source
;
uLong
sourceLen
;
int
level
;
{
z_stream
stream
;
int
err
;
const
uInt
max
=
(
uInt
)
-
1
;
uLong
left
;
left
=
*
destLen
;
*
destLen
=
0
;
stream
.
zalloc
=
(
alloc_func
)
0
;
stream
.
zfree
=
(
free_func
)
0
;
stream
.
opaque
=
(
voidpf
)
0
;
err
=
deflateInit
(
&
stream
,
level
);
if
(
err
!=
Z_OK
)
return
err
;
stream
.
next_out
=
dest
;
stream
.
avail_out
=
0
;
stream
.
next_in
=
(
z_const
Bytef
*
)
source
;
stream
.
avail_in
=
0
;
do
{
if
(
stream
.
avail_out
==
0
)
{
stream
.
avail_out
=
left
>
(
uLong
)
max
?
max
:
(
uInt
)
left
;
left
-=
stream
.
avail_out
;
}
if
(
stream
.
avail_in
==
0
)
{
stream
.
avail_in
=
sourceLen
>
(
uLong
)
max
?
max
:
(
uInt
)
sourceLen
;
sourceLen
-=
stream
.
avail_in
;
}
err
=
deflate
(
&
stream
,
sourceLen
?
Z_NO_FLUSH
:
Z_FINISH
);
}
while
(
err
==
Z_OK
);
*
destLen
=
stream
.
total_out
;
deflateEnd
(
&
stream
);
return
err
==
Z_STREAM_END
?
Z_OK
:
err
;
}
/* ===========================================================================
*/
int
ZEXPORT
compress
(
dest
,
destLen
,
source
,
sourceLen
)
Bytef
*
dest
;
uLongf
*
destLen
;
const
Bytef
*
source
;
uLong
sourceLen
;
{
return
compress2
(
dest
,
destLen
,
source
,
sourceLen
,
Z_DEFAULT_COMPRESSION
);
}
/* ===========================================================================
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
uLong
ZEXPORT
compressBound
(
sourceLen
)
uLong
sourceLen
;
{
return
sourceLen
+
(
sourceLen
>>
12
)
+
(
sourceLen
>>
14
)
+
(
sourceLen
>>
25
)
+
13
;
}
lib/libvgz/infback.c
deleted
100644 → 0
View file @
67f5fadd
This diff is collapsed.
Click to expand it.
lib/libvgz/uncompr.c
deleted
100644 → 0
View file @
67f5fadd
/* uncompr.c -- decompress a memory buffer
* Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#define ZLIB_INTERNAL
#include "vgz.h"
/* ===========================================================================
Decompresses the source buffer into the destination buffer. *sourceLen is
the byte length of the source buffer. Upon entry, *destLen is the total size
of the destination buffer, which must be large enough to hold the entire
uncompressed data. (The size of the uncompressed data must have been saved
previously by the compressor and transmitted to the decompressor by some
mechanism outside the scope of this compression library.) Upon exit,
*destLen is the size of the decompressed data and *sourceLen is the number
of source bytes consumed. Upon return, source + *sourceLen points to the
first unused input byte.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
Z_DATA_ERROR if the input data was corrupted, including if the input data is
an incomplete zlib stream.
*/
int
ZEXPORT
uncompress2
(
dest
,
destLen
,
source
,
sourceLen
)
Bytef
*
dest
;
uLongf
*
destLen
;
const
Bytef
*
source
;
uLong
*
sourceLen
;
{
z_stream
stream
;
int
err
;
const
uInt
max
=
(
uInt
)
-
1
;
uLong
len
,
left
;
Byte
buf
[
1
];
/* for detection of incomplete stream when *destLen == 0 */
len
=
*
sourceLen
;
if
(
*
destLen
)
{
left
=
*
destLen
;
*
destLen
=
0
;
}
else
{
left
=
1
;
dest
=
buf
;
}
stream
.
next_in
=
(
z_const
Bytef
*
)
source
;
stream
.
avail_in
=
0
;
stream
.
zalloc
=
(
alloc_func
)
0
;
stream
.
zfree
=
(
free_func
)
0
;
stream
.
opaque
=
(
voidpf
)
0
;
err
=
inflateInit
(
&
stream
);
if
(
err
!=
Z_OK
)
return
err
;
stream
.
next_out
=
dest
;
stream
.
avail_out
=
0
;
do
{
if
(
stream
.
avail_out
==
0
)
{
stream
.
avail_out
=
left
>
(
uLong
)
max
?
max
:
(
uInt
)
left
;
left
-=
stream
.
avail_out
;
}
if
(
stream
.
avail_in
==
0
)
{
stream
.
avail_in
=
len
>
(
uLong
)
max
?
max
:
(
uInt
)
len
;
len
-=
stream
.
avail_in
;
}
err
=
inflate
(
&
stream
,
Z_NO_FLUSH
);
}
while
(
err
==
Z_OK
);
*
sourceLen
-=
len
+
stream
.
avail_in
;
if
(
dest
!=
buf
)
*
destLen
=
stream
.
total_out
;
else
if
(
stream
.
total_out
&&
err
==
Z_BUF_ERROR
)
left
=
1
;
inflateEnd
(
&
stream
);
return
err
==
Z_STREAM_END
?
Z_OK
:
err
==
Z_NEED_DICT
?
Z_DATA_ERROR
:
err
==
Z_BUF_ERROR
&&
left
+
stream
.
avail_out
?
Z_DATA_ERROR
:
err
;
}
int
ZEXPORT
uncompress
(
dest
,
destLen
,
source
,
sourceLen
)
Bytef
*
dest
;
uLongf
*
destLen
;
const
Bytef
*
source
;
uLong
sourceLen
;
{
return
uncompress2
(
dest
,
destLen
,
source
,
&
sourceLen
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment