lz4-native-ruby 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,193 @@
1
+ LZ4 - Library Files
2
+ ================================
3
+
4
+ The `/lib` directory contains many files, but depending on project's objectives,
5
+ not all of them are required.
6
+ Limited systems may want to reduce the nb of source files to include
7
+ as a way to reduce binary size and dependencies.
8
+
9
+ Capabilities are added at the "level" granularity, detailed below.
10
+
11
+ #### Level 1 : Minimal LZ4 build
12
+
13
+ The minimum required is **`lz4.c`** and **`lz4.h`**,
14
+ which provides the fast compression and decompression algorithms.
15
+ They generate and decode data using the [LZ4 block format].
16
+
17
+
18
+ #### Level 2 : High Compression variant
19
+
20
+ For more compression ratio at the cost of compression speed,
21
+ the High Compression variant called **lz4hc** is available.
22
+ Add files **`lz4hc.c`** and **`lz4hc.h`**.
23
+ This variant also compresses data using the [LZ4 block format],
24
+ and depends on regular `lib/lz4.*` source files.
25
+
26
+
27
+ #### Level 3 : Frame support, for interoperability
28
+
29
+ In order to produce compressed data compatible with `lz4` command line utility,
30
+ it's necessary to use the [official interoperable frame format].
31
+ This format is generated and decoded automatically by the **lz4frame** library.
32
+ Its public API is described in `lib/lz4frame.h`.
33
+ In order to work properly, lz4frame needs all other modules present in `/lib`,
34
+ including, lz4 and lz4hc, and also **xxhash**.
35
+ So it's necessary to also include `xxhash.c` and `xxhash.h`.
36
+
37
+
38
+ #### Level 4 : File compression operations
39
+
40
+ As a helper around file operations,
41
+ the library has been recently extended with `lz4file.c` and `lz4file.h`
42
+ (still considered experimental at the time of this writing).
43
+ These helpers allow opening, reading, writing, and closing files
44
+ using transparent LZ4 compression / decompression.
45
+ As a consequence, using `lz4file` adds a dependency on `<stdio.h>`.
46
+
47
+ `lz4file` relies on `lz4frame` in order to produce compressed data
48
+ conformant to the [LZ4 Frame format] specification.
49
+ Consequently, to enable this capability,
50
+ it's necessary to include all `*.c` and `*.h` files from `lib/` directory.
51
+
52
+
53
+ #### Advanced / Experimental API
54
+
55
+ Definitions which are not guaranteed to remain stable in future versions,
56
+ are protected behind macros, such as `LZ4_STATIC_LINKING_ONLY`.
57
+ As the name suggests, these definitions should only be invoked
58
+ in the context of static linking ***only***.
59
+ Otherwise, dependent application may fail on API or ABI break in the future.
60
+ The associated symbols are also not exposed by the dynamic library by default.
61
+ Should they be nonetheless needed, it's possible to force their publication
62
+ by using build macros `LZ4_PUBLISH_STATIC_FUNCTIONS`
63
+ and `LZ4F_PUBLISH_STATIC_FUNCTIONS`.
64
+
65
+
66
+ #### Build macros
67
+
68
+ The following build macro can be selected to adjust source code behavior at compilation time :
69
+
70
+ - `LZ4_FAST_DEC_LOOP` : this triggers a speed optimized decompression loop, more powerful on modern cpus.
71
+ This loop works great on `x86`, `x64` and `aarch64` cpus, and is automatically enabled for them.
72
+ It's also possible to enable or disable it manually, by passing `LZ4_FAST_DEC_LOOP=1` or `0` to the preprocessor.
73
+ For example, with `gcc` : `-DLZ4_FAST_DEC_LOOP=1`,
74
+ and with `make` : `CPPFLAGS+=-DLZ4_FAST_DEC_LOOP=1 make lz4`.
75
+
76
+ - `LZ4_DISTANCE_MAX` : control the maximum offset that the compressor will allow.
77
+ Set to 65535 by default, which is the maximum value supported by lz4 format.
78
+ Reducing maximum distance will reduce opportunities for LZ4 to find matches,
79
+ hence will produce a worse compression ratio.
80
+ Setting a smaller max distance could allow compatibility with specific decoders with limited memory budget.
81
+ This build macro only influences the compressed output of the compressor.
82
+
83
+ - `LZ4_DISABLE_DEPRECATE_WARNINGS` : invoking a deprecated function will make the compiler generate a warning.
84
+ This is meant to invite users to update their source code.
85
+ Should this be a problem, it's generally possible to make the compiler ignore these warnings,
86
+ for example with `-Wno-deprecated-declarations` on `gcc`,
87
+ or `_CRT_SECURE_NO_WARNINGS` for Visual Studio.
88
+ This build macro offers another project-specific method
89
+ by defining `LZ4_DISABLE_DEPRECATE_WARNINGS` before including the LZ4 header files.
90
+
91
+ - `LZ4_FORCE_SW_BITCOUNT` : by default, the compression algorithm tries to determine lengths
92
+ by using bitcount instructions, generally implemented as fast single instructions in many cpus.
93
+ In case the target cpus doesn't support it, or compiler intrinsic doesn't work, or feature bad performance,
94
+ it's possible to use an optimized software path instead.
95
+ This is achieved by setting this build macros.
96
+ In most cases, it's not expected to be necessary,
97
+ but it can be legitimately considered for less common platforms.
98
+
99
+ - `LZ4_ALIGN_TEST` : alignment test ensures that the memory area
100
+ passed as argument to become a compression state is suitably aligned.
101
+ This test can be disabled if it proves flaky, by setting this value to 0.
102
+
103
+ - `LZ4_USER_MEMORY_FUNCTIONS` : replace calls to `<stdlib.h>`'s `malloc()`, `calloc()` and `free()`
104
+ by user-defined functions, which must be named `LZ4_malloc()`, `LZ4_calloc()` and `LZ4_free()`.
105
+ User functions must be available at link time.
106
+
107
+ - `LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION` :
108
+ Remove support of dynamic memory allocation.
109
+ For more details, see description of this macro in `lib/lz4.c`.
110
+
111
+ - `LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT` : experimental feature aimed at producing the same
112
+ compressed output on platforms of different endianness (i.e. little-endian and big-endian).
113
+ Output on little-endian platforms shall remain unchanged, while big-endian platforms will start producing
114
+ the same output as little-endian ones. This isn't expected to impact backward- and forward-compatibility
115
+ in any way.
116
+
117
+ - `LZ4_FREESTANDING` : by setting this build macro to 1,
118
+ LZ4/HC removes dependencies on the C standard library,
119
+ including allocation functions and `memmove()`, `memcpy()`, and `memset()`.
120
+ This build macro is designed to help use LZ4/HC in restricted environments
121
+ (embedded, bootloader, etc).
122
+ For more details, see description of this macro in `lib/lz4.h`.
123
+
124
+ - `LZ4_HEAPMODE` : Select how stateless compression functions like `LZ4_compress_default()`
125
+ allocate memory for their hash table,
126
+ in memory stack (0:default, fastest), or in memory heap (1:requires malloc()).
127
+
128
+ - `LZ4HC_HEAPMODE` : Select how stateless HC compression functions like `LZ4_compress_HC()`
129
+ allocate memory for their workspace:
130
+ in stack (0), or in heap (1:default).
131
+ Since workspace is rather large, stack can be inconvenient, hence heap mode is recommended.
132
+
133
+ - `LZ4F_HEAPMODE` : selects how `LZ4F_compressFrame()` allocates the compression state,
134
+ either on stack (default, value 0) or using heap memory (value 1).
135
+
136
+
137
+ #### Makefile variables
138
+
139
+ The following `Makefile` variables can be selected to alter the profile of produced binaries :
140
+ - `BUILD_SHARED` : generate `liblz4` dynamic library (enabled by default)
141
+ - `BUILD_STATIC` : generate `liblz4` static library (enabled by default)
142
+
143
+
144
+ #### Amalgamation
145
+
146
+ lz4 source code can be amalgamated into a single file.
147
+ One can combine all source code into `lz4_all.c` by using following command:
148
+ ```
149
+ cat lz4.c lz4hc.c lz4frame.c > lz4_all.c
150
+ ```
151
+ (`cat` file order is important) then compile `lz4_all.c`.
152
+ All `*.h` files present in `/lib` remain necessary to compile `lz4_all.c`.
153
+
154
+
155
+ #### Windows : using MinGW+MSYS to create DLL
156
+
157
+ DLL can be created using MinGW+MSYS with the `make liblz4` command.
158
+ This command creates `dll\liblz4.dll` and the import library `dll\liblz4.lib`.
159
+ To override the `dlltool` command when cross-compiling on Linux, just set the `DLLTOOL` variable. Example of cross compilation on Linux with mingw-w64 64 bits:
160
+ ```
161
+ make BUILD_STATIC=no CC=x86_64-w64-mingw32-gcc DLLTOOL=x86_64-w64-mingw32-dlltool OS=Windows_NT
162
+ ```
163
+ The import library is only required with Visual C++.
164
+ The header files `lz4.h`, `lz4hc.h`, `lz4frame.h` and the dynamic library
165
+ `dll\liblz4.dll` are required to compile a project using gcc/MinGW.
166
+ The dynamic library has to be added to linking options.
167
+ It means that if a project that uses LZ4 consists of a single `test-dll.c`
168
+ file it should be linked with `dll\liblz4.dll`. For example:
169
+ ```
170
+ $(CC) $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\liblz4.dll
171
+ ```
172
+ The compiled executable will require LZ4 DLL which is available at `dll\liblz4.dll`.
173
+
174
+
175
+ #### Miscellaneous
176
+
177
+ Other files present in the directory are not source code. They are :
178
+
179
+ - `LICENSE` : contains the BSD license text
180
+ - `Makefile` : `make` script to compile and install lz4 library (static and dynamic)
181
+ - `liblz4.pc.in` : for `pkg-config` (used in `make install`)
182
+ - `README.md` : this file
183
+
184
+ [official interoperable frame format]: ../doc/lz4_Frame_format.md
185
+ [LZ4 Frame format]: ../doc/lz4_Frame_format.md
186
+ [LZ4 block format]: ../doc/lz4_Block_format.md
187
+
188
+
189
+ #### License
190
+
191
+ All source material within __lib__ directory are BSD 2-Clause licensed.
192
+ See [LICENSE](LICENSE) for details.
193
+ The license is also reminded at the top of each source file.
@@ -0,0 +1,63 @@
1
+ # ##########################################################################
2
+ # LZ4 programs - Makefile
3
+ # Copyright (C) Yann Collet 2016-2020
4
+ #
5
+ # GPL v2 License
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License along
18
+ # with this program; if not, write to the Free Software Foundation, Inc.,
19
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
+ #
21
+ # You can contact the author at :
22
+ # - LZ4 homepage : http://www.lz4.org
23
+ # - LZ4 source repository : https://github.com/lz4/lz4
24
+ # ##########################################################################
25
+
26
+ VOID := /dev/null
27
+ LZ4DIR := ../include
28
+ LIBDIR := ../static
29
+ DLLDIR := ../dll
30
+
31
+ CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
32
+ CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
33
+ -Wdeclaration-after-statement -Wstrict-prototypes \
34
+ -Wpointer-arith -Wstrict-aliasing=1
35
+ CFLAGS += $(MOREFLAGS)
36
+ CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
37
+ FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
38
+
39
+
40
+ # Define *.exe as extension for Windows systems
41
+ ifneq (,$(filter Windows%,$(OS)))
42
+ EXT =.exe
43
+ else
44
+ EXT =
45
+ endif
46
+
47
+ .PHONY: default fullbench-dll fullbench-lib
48
+
49
+
50
+ default: all
51
+
52
+ all: fullbench-dll fullbench-lib
53
+
54
+
55
+ fullbench-lib: fullbench.c xxhash.c
56
+ $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/liblz4_static.lib
57
+
58
+ fullbench-dll: fullbench.c xxhash.c
59
+ $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(DLLDIR)/liblz4.dll
60
+
61
+ clean:
62
+ @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \
63
+ @echo Cleaning completed
@@ -0,0 +1,69 @@
1
+ LZ4 Windows binary package
2
+ ====================================
3
+
4
+ #### The package contents
5
+
6
+ - `lz4.exe` : Command Line Utility, supporting gzip-like arguments
7
+ - `dll\msys-lz4-1.dll` : The DLL of LZ4 library, compiled by msys
8
+ - `dll\liblz4.dll.a` : The import library of LZ4 library for Visual C++
9
+ - `example\` : The example of usage of LZ4 library
10
+ - `include\` : Header files required with LZ4 library
11
+ - `static\liblz4_static.lib` : The static LZ4 library
12
+
13
+
14
+ #### Usage of Command Line Interface
15
+
16
+ Command Line Interface (CLI) supports gzip-like arguments.
17
+ By default CLI takes an input file and compresses it to an output file:
18
+ ```
19
+ Usage: lz4 [arg] [input] [output]
20
+ ```
21
+ The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can
22
+ be improved with commands from `-3` to `-16` but higher levels also have slower
23
+ compression. CLI includes in-memory compression benchmark module with compression
24
+ levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds.
25
+ CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined
26
+ into `-b1e18i1`.
27
+
28
+
29
+ #### The example of usage of static and dynamic LZ4 libraries with gcc/MinGW
30
+
31
+ Use `cd example` and `make` to build `fullbench-dll` and `fullbench-lib`.
32
+ `fullbench-dll` uses a dynamic LZ4 library from the `dll` directory.
33
+ `fullbench-lib` uses a static LZ4 library from the `lib` directory.
34
+
35
+
36
+ #### Using LZ4 DLL with gcc/MinGW
37
+
38
+ The header files from `include\` and the dynamic library `dll\msys-lz4-1.dll`
39
+ are required to compile a project using gcc/MinGW.
40
+ The dynamic library has to be added to linking options.
41
+ It means that if a project that uses LZ4 consists of a single `test-dll.c`
42
+ file it should be linked with `dll\msys-lz4-1.dll`. For example:
43
+ ```
44
+ gcc $(CFLAGS) -Iinclude\ test-dll.c -o test-dll dll\msys-lz4-1.dll
45
+ ```
46
+ The compiled executable will require LZ4 DLL which is available at `dll\msys-lz4-1.dll`.
47
+
48
+
49
+ #### The example of usage of static and dynamic LZ4 libraries with Visual C++
50
+
51
+ Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a
52
+ dynamic LZ4 library from the `dll` directory. The solution works with Visual C++
53
+ 2010 or newer. When one will open the solution with Visual C++ newer than 2010
54
+ then the solution will be upgraded to the current version.
55
+
56
+
57
+ #### Using LZ4 DLL with Visual C++
58
+
59
+ The header files from `include\` and the import library `dll\liblz4.dll.a`
60
+ are required to compile a project using Visual C++.
61
+
62
+ 1. The header files should be added to `Additional Include Directories` that can
63
+ be found in project properties `C/C++` then `General`.
64
+ 2. The import library has to be added to `Additional Dependencies` that can
65
+ be found in project properties `Linker` then `Input`.
66
+ If one will provide only the name `liblz4.dll.a` without a full path to the library
67
+ the directory has to be added to `Linker\General\Additional Library Directories`.
68
+
69
+ The compiled executable will require LZ4 DLL which is available at `dll\msys-lz4-1.dll`.
@@ -0,0 +1,25 @@
1
+ Microsoft Visual Studio Solution File, Format Version 12.00
2
+ # Visual Studio Express 2012 for Windows Desktop
3
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}"
4
+ EndProject
5
+ Global
6
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
7
+ Debug|Win32 = Debug|Win32
8
+ Debug|x64 = Debug|x64
9
+ Release|Win32 = Release|Win32
10
+ Release|x64 = Release|x64
11
+ EndGlobalSection
12
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
13
+ {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32
14
+ {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32
15
+ {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64
16
+ {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64
17
+ {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32
18
+ {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32
19
+ {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64
20
+ {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64
21
+ EndGlobalSection
22
+ GlobalSection(SolutionProperties) = preSolution
23
+ HideSolutionNode = FALSE
24
+ EndGlobalSection
25
+ EndGlobal
@@ -0,0 +1,182 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup Label="ProjectConfigurations">
4
+ <ProjectConfiguration Include="Debug|Win32">
5
+ <Configuration>Debug</Configuration>
6
+ <Platform>Win32</Platform>
7
+ </ProjectConfiguration>
8
+ <ProjectConfiguration Include="Debug|x64">
9
+ <Configuration>Debug</Configuration>
10
+ <Platform>x64</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="Release|Win32">
13
+ <Configuration>Release</Configuration>
14
+ <Platform>Win32</Platform>
15
+ </ProjectConfiguration>
16
+ <ProjectConfiguration Include="Release|x64">
17
+ <Configuration>Release</Configuration>
18
+ <Platform>x64</Platform>
19
+ </ProjectConfiguration>
20
+ </ItemGroup>
21
+ <PropertyGroup Label="Globals">
22
+ <ProjectGuid>{13992FD2-077E-4954-B065-A428198201A9}</ProjectGuid>
23
+ <Keyword>Win32Proj</Keyword>
24
+ <RootNamespace>fullbench-dll</RootNamespace>
25
+ <OutDir>$(SolutionDir)bin\$(Platform)_$(Configuration)\</OutDir>
26
+ <IntDir>$(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\</IntDir>
27
+ </PropertyGroup>
28
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30
+ <ConfigurationType>Application</ConfigurationType>
31
+ <UseDebugLibraries>true</UseDebugLibraries>
32
+ <CharacterSet>Unicode</CharacterSet>
33
+ </PropertyGroup>
34
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
35
+ <ConfigurationType>Application</ConfigurationType>
36
+ <UseDebugLibraries>true</UseDebugLibraries>
37
+ <CharacterSet>Unicode</CharacterSet>
38
+ </PropertyGroup>
39
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
40
+ <ConfigurationType>Application</ConfigurationType>
41
+ <UseDebugLibraries>false</UseDebugLibraries>
42
+ <WholeProgramOptimization>true</WholeProgramOptimization>
43
+ <CharacterSet>Unicode</CharacterSet>
44
+ </PropertyGroup>
45
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
46
+ <ConfigurationType>Application</ConfigurationType>
47
+ <UseDebugLibraries>false</UseDebugLibraries>
48
+ <WholeProgramOptimization>true</WholeProgramOptimization>
49
+ <CharacterSet>Unicode</CharacterSet>
50
+ </PropertyGroup>
51
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
52
+ <ImportGroup Label="ExtensionSettings">
53
+ </ImportGroup>
54
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
55
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
56
+ </ImportGroup>
57
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
58
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
59
+ </ImportGroup>
60
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
61
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62
+ </ImportGroup>
63
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
64
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65
+ </ImportGroup>
66
+ <PropertyGroup Label="UserMacros" />
67
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
68
+ <LinkIncremental>true</LinkIncremental>
69
+ <IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
70
+ </PropertyGroup>
71
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
72
+ <LinkIncremental>true</LinkIncremental>
73
+ <IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
74
+ <RunCodeAnalysis>true</RunCodeAnalysis>
75
+ </PropertyGroup>
76
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
77
+ <LinkIncremental>false</LinkIncremental>
78
+ <IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
79
+ </PropertyGroup>
80
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
81
+ <LinkIncremental>false</LinkIncremental>
82
+ <IncludePath>$(IncludePath);$(UniversalCRT_IncludePath);$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
83
+ <RunCodeAnalysis>true</RunCodeAnalysis>
84
+ </PropertyGroup>
85
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
86
+ <ClCompile>
87
+ <PrecompiledHeader>
88
+ </PrecompiledHeader>
89
+ <WarningLevel>Level4</WarningLevel>
90
+ <Optimization>Disabled</Optimization>
91
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
+ <TreatWarningAsError>true</TreatWarningAsError>
93
+ <EnablePREfast>false</EnablePREfast>
94
+ <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
95
+ </ClCompile>
96
+ <Link>
97
+ <SubSystem>Console</SubSystem>
98
+ <GenerateDebugInformation>true</GenerateDebugInformation>
99
+ <AdditionalLibraryDirectories>$(SolutionDir)..\dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
100
+ <AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
101
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
102
+ </Link>
103
+ </ItemDefinitionGroup>
104
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
105
+ <ClCompile>
106
+ <PrecompiledHeader>
107
+ </PrecompiledHeader>
108
+ <WarningLevel>Level4</WarningLevel>
109
+ <Optimization>Disabled</Optimization>
110
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
111
+ <TreatWarningAsError>true</TreatWarningAsError>
112
+ <EnablePREfast>true</EnablePREfast>
113
+ <AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
114
+ <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
115
+ </ClCompile>
116
+ <Link>
117
+ <SubSystem>Console</SubSystem>
118
+ <GenerateDebugInformation>true</GenerateDebugInformation>
119
+ <AdditionalLibraryDirectories>$(SolutionDir)..\dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
120
+ <AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
121
+ </Link>
122
+ </ItemDefinitionGroup>
123
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
124
+ <ClCompile>
125
+ <WarningLevel>Level4</WarningLevel>
126
+ <PrecompiledHeader>
127
+ </PrecompiledHeader>
128
+ <Optimization>MaxSpeed</Optimization>
129
+ <FunctionLevelLinking>true</FunctionLevelLinking>
130
+ <IntrinsicFunctions>true</IntrinsicFunctions>
131
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
132
+ <TreatWarningAsError>false</TreatWarningAsError>
133
+ <EnablePREfast>false</EnablePREfast>
134
+ <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
135
+ </ClCompile>
136
+ <Link>
137
+ <SubSystem>Console</SubSystem>
138
+ <GenerateDebugInformation>true</GenerateDebugInformation>
139
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
140
+ <OptimizeReferences>true</OptimizeReferences>
141
+ <AdditionalLibraryDirectories>$(SolutionDir)..\dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
142
+ <AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
143
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
144
+ </Link>
145
+ </ItemDefinitionGroup>
146
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
147
+ <ClCompile>
148
+ <WarningLevel>Level4</WarningLevel>
149
+ <PrecompiledHeader>
150
+ </PrecompiledHeader>
151
+ <Optimization>MaxSpeed</Optimization>
152
+ <FunctionLevelLinking>true</FunctionLevelLinking>
153
+ <IntrinsicFunctions>true</IntrinsicFunctions>
154
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_IMPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
155
+ <TreatWarningAsError>false</TreatWarningAsError>
156
+ <EnablePREfast>true</EnablePREfast>
157
+ <AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions>
158
+ <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
159
+ </ClCompile>
160
+ <Link>
161
+ <SubSystem>Console</SubSystem>
162
+ <GenerateDebugInformation>true</GenerateDebugInformation>
163
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
164
+ <OptimizeReferences>true</OptimizeReferences>
165
+ <AdditionalLibraryDirectories>$(SolutionDir)..\dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
166
+ <AdditionalDependencies>liblz4.lib;%(AdditionalDependencies)</AdditionalDependencies>
167
+ </Link>
168
+ </ItemDefinitionGroup>
169
+ <ItemGroup>
170
+ <ClCompile Include="xxhash.c" />
171
+ <ClCompile Include="fullbench.c" />
172
+ </ItemGroup>
173
+ <ItemGroup>
174
+ <ClInclude Include="..\include\lz4.h" />
175
+ <ClInclude Include="..\include\lz4frame.h" />
176
+ <ClInclude Include="..\include\lz4hc.h" />
177
+ <ClInclude Include="xxhash.h" />
178
+ </ItemGroup>
179
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
180
+ <ImportGroup Label="ExtensionTargets">
181
+ </ImportGroup>
182
+ </Project>
@@ -0,0 +1,35 @@
1
+ #include <windows.h>
2
+
3
+ // DLL version information.
4
+ 1 VERSIONINFO
5
+ FILEVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
6
+ PRODUCTVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
7
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
8
+ #ifdef _DEBUG
9
+ FILEFLAGS VS_FF_DEBUG | VS_FF_PRERELEASE
10
+ #else
11
+ FILEFLAGS 0
12
+ #endif
13
+ FILEOS VOS_NT_WINDOWS32
14
+ FILETYPE VFT_DLL
15
+ FILESUBTYPE VFT2_UNKNOWN
16
+ BEGIN
17
+ BLOCK "StringFileInfo"
18
+ BEGIN
19
+ BLOCK "040904B0"
20
+ BEGIN
21
+ VALUE "CompanyName", "Yann Collet"
22
+ VALUE "FileDescription", "Extremely fast compression"
23
+ VALUE "FileVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
24
+ VALUE "InternalName", "@LIBLZ4@"
25
+ VALUE "LegalCopyright", "Copyright (C) 2013-2020, Yann Collet"
26
+ VALUE "OriginalFilename", "@LIBLZ4@.dll"
27
+ VALUE "ProductName", "LZ4"
28
+ VALUE "ProductVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
29
+ END
30
+ END
31
+ BLOCK "VarFileInfo"
32
+ BEGIN
33
+ VALUE "Translation", 0x0409, 1200
34
+ END
35
+ END
@@ -0,0 +1,14 @@
1
+ # LZ4 - Fast LZ compression algorithm
2
+ # Copyright (C) 2011-2020, Yann Collet.
3
+ # BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
4
+
5
+ prefix=@PREFIX@
6
+ libdir=@LIBDIR@
7
+ includedir=@INCLUDEDIR@
8
+
9
+ Name: lz4
10
+ Description: extremely fast lossless compression algorithm library
11
+ URL: http://www.lz4.org/
12
+ Version: @VERSION@
13
+ Libs: -L${libdir} -llz4
14
+ Cflags: -I${includedir}