Name
SPVM::Resource::Zlib - zlib Resources
Description
SPVM::Resource::Zlib class in SPVM is a resource class for zlib library.
Usage
MyClass.config:
my $config = SPVM::Builder::Config->new_gnu99;
$config->use_resource('Resource::Zlib');
$config;
MyClass.c:
#include <zlib.h>
const char* file = "foo.gz";
gzFile gz_fh = gzopen(file, "rb");
Original Product
Original Product Version
Language
The C language
Language Specification
GNU C99
Header Files
spvm_socket_util.hcrc32.hdeflate.hgzguts.hinffast.hinffixed.hinflate.hinftrees.htrees.hzconf.hzlib.hzutil.h
Source Files
adler32.ccompress.ccrc32.cdeflate.cgzclose.cgzlib.cgzread.cgzwrite.cinfback.cinffast.cinflate.cinftrees.ctrees.cuncompr.czutil.c
Compiler Flags
-D_LARGEFILE64_SOURCE
How to Create Resource
Download
mkdir -p .tmp
git clone https://github.com/madler/zlib .tmp/zlib
git -C .tmp/zlib checkout tags/v1.3.1 -b branch_v1.3.1
git -C .tmp/zlib branch
Extracting Header Files
The header files of zlib is copied into the include directory by the following command.
rsync -av --include='*.h' --exclude='*' .tmp/zlib/ lib/SPVM/Resource/Zlib.native/include/
Extracting Source Files
The source files of zlib are copied into the src directory by the following command.
rsync -av --exclude='*.h' .tmp/zlib/ lib/SPVM/Resource/Zlib.native/src/
The used source files are extracted by the following command.
find lib/SPVM/Resource/Zlib.native/src/* | perl -p -e 's|^\Qlib/SPVM/Resource/Zlib.native/src/||' | grep -P '^\w+\.c$'
Repository
Author
Yuki Kimoto kimoto.yuki@gmail.com
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License