zlib

Can't compile libpng 1.6 on windows via cmake: Cannot open include file: 'zlib.h': No such file or directory

假装没事ソ 提交于 2020-01-17 05:59:14
问题 VS 2015 Update 1. Prebuilt zlib is extracted into project/zlib. find_package finds it alright with proper vars supplied. It adds the dir as include in cl invocation: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /IC:\project\zlib\include /IC:\project\libpng /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D _CRT_SECURE_NO_DEPRECATE /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"png16_static.dir

vs2015编译zlib静态库步骤

▼魔方 西西 提交于 2020-01-17 01:29:27
ZLIB静态库的编译 下载ZLIB源码 ZLib官网下载或者GitHub上直接 clone 下来即可 www.zlib.net 截至目前最新版本1.2.1.1本 如下图我选择从官网下载 下载完以后解压得到源代码目录结构大致如下 amiga ├─contrib │ ├─ada │ ├─amd64 │ ├─asm686 │ ├─blast │ ├─delphi │ ├─dotzlib │ │ └─DotZLib │ ├─gcc_gvmat64 │ ├─infback9 │ ├─inflate86 │ ├─iostream │ ├─iostream2 │ ├─iostream3 │ ├─masmx64 │ ├─masmx86 │ ├─minizip │ ├─pascal │ ├─puff │ ├─testzlib │ ├─untgz │ └─vstudio │ ├─vc10 │ ├─vc11 │ ├─vc12 │ ├─vc14 │ │ └─x86 │ │ ├─MiniUnzipDebug │ │ │ └─Tmp │ │ │ └─miniunz.tlog │ │ ├─MiniUnzipRelease │ │ │ └─Tmp │ │ │ └─miniunz.tlog │ │ ├─MiniZipDebug │ │ │ └─Tmp │ │ │ └─minizip.tlog │ │ ├

How to interpret the final 0x03 0x00 in this minimal gzip sample?

妖精的绣舞 提交于 2020-01-16 10:45:10
问题 I'm reading gzip format specification, trying to understand byte-to-byte the following minimal example (generated using echo -n | gzip > /tmp/a.gz ): 00000000 1f 8b 08 00 70 3c b4 5d 00 03 03 00 00 00 00 00 |....p<.]........| 00000010 00 00 00 00 |....| 00000014 I managed to map most of the bytes, but the "03 00" is something I cannot interpret. I wrote a Python script to fuzz different values for the "03" byte, but nothing other than that byte is allowed: [15:13:05]>>> import subprocess [15

How to interpret the final 0x03 0x00 in this minimal gzip sample?

a 夏天 提交于 2020-01-16 10:44:05
问题 I'm reading gzip format specification, trying to understand byte-to-byte the following minimal example (generated using echo -n | gzip > /tmp/a.gz ): 00000000 1f 8b 08 00 70 3c b4 5d 00 03 03 00 00 00 00 00 |....p<.]........| 00000010 00 00 00 00 |....| 00000014 I managed to map most of the bytes, but the "03 00" is something I cannot interpret. I wrote a Python script to fuzz different values for the "03" byte, but nothing other than that byte is allowed: [15:13:05]>>> import subprocess [15

How to interpret the final 0x03 0x00 in this minimal gzip sample?

半城伤御伤魂 提交于 2020-01-16 10:43:29
问题 I'm reading gzip format specification, trying to understand byte-to-byte the following minimal example (generated using echo -n | gzip > /tmp/a.gz ): 00000000 1f 8b 08 00 70 3c b4 5d 00 03 03 00 00 00 00 00 |....p<.]........| 00000010 00 00 00 00 |....| 00000014 I managed to map most of the bytes, but the "03 00" is something I cannot interpret. I wrote a Python script to fuzz different values for the "03" byte, but nothing other than that byte is allowed: [15:13:05]>>> import subprocess [15

zlib库VS2015编译步骤

北慕城南 提交于 2020-01-15 19:24:02
[点击这里下载zlib1.2.8源码]( http://zlib.net/zlib128.zip) [点击这里下载zlib1.2.8编译动态库]( http://zlib.net/zlib128-dll.zip) #下载源码库# 从上面给出的源码路径下载zlib源码库,如果不想自己编译,可以使用上面给出的二进制包直接使用,无视本文。 #编译步骤# ##编译方法一## - 解压源码文件到指定目录,例如 x:\zlib - 打开VS2015的Developer Command Prompt for VS2015工具 - 切换到x:\zlib\contrib\masmx86目录,如果想编译x64的,可以进入masmx64目录,我这里只使用32位 - 执行bld_ml32.bat文件,静待片刻会在文件目录中产生4个文件 - 将生成文件中的inffas32.obj和match686.obj文件复制到根目录 x:\zlib下 - 将 Developer Command Prompt for VS2015工具目录切换到根目录 x:\zlib - 执行nmake命令 ``` nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj" ``` - 编译成功以后,就会在根目录产生一系列文件

Why zlib.deflate(buf, callback) is async?

懵懂的女人 提交于 2020-01-15 15:39:18
问题 When accepting an input buffer, and knowing compression is a CPU bound task, does it needs to offer a callback? Is it just there to follow common practice like callback(err, result) ? Doc: http://nodejs.org/api/zlib.html#zlib_zlib_deflate_buf_callback 回答1: The compression/decompression is executed in a separate thread and not in the main thread. That is why a callback is needed for when the thread completes its work. The callback style is the same common signature used throughout node and

Compressing small piece of data

[亡魂溺海] 提交于 2020-01-15 07:26:07
问题 I have a buffer of let's say 4KB, containing data in JSON-like format. I need to add significantly more information (up to let's say 3x more) to it, but I have to fit in this small chunk of memory. I was thinking about using libZ to compress text, but I'm afraid it will not perform well since the data consists mostly of some unique substrings. What would you recommend in this situation? Thanks, Chris 回答1: Consider a fixed dictionary containing up to 32K of strings that you expect to appear in

Cross Compile zlib for ARM

余生长醉 提交于 2020-01-14 04:15:48
问题 I try cross compile zlib for arm-poky-linux-gnueabi but I've an error when I launch make : ...:~/zlib-1.2.11$ AR=$HOST-ar CC=$HOST-gcc RANLIB=$HOST-ranlib ./configure --prefix=$HOME/zlibARM Checking for shared library support... Building shared library libz.so.1.2.11 with arm-poky-linux-gnueabi-gcc. Checking for size_t... Yes. Checking for off64_t... Yes. Checking for fseeko... Yes. Checking for strerror... Yes. Checking for unistd.h... Yes. Checking for stdarg.h... Yes. Checking whether to

C/C++ Packing and Compression [closed]

旧巷老猫 提交于 2020-01-12 21:06:24
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I'm working on a commercial project that requires a couple of files to be bundled (packed) into an archive and then compressed. Right now we have zlib in our utility library, but it doesn't look like zlib has the functionality to compress multiple files into one archive. Does