-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lzham: fix handling of static/shared on Windows
- Loading branch information
Showing
2 changed files
with
55 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
#include <cstdlib> | ||
#include <cstring> | ||
#include <string> | ||
#include <iostream> | ||
|
||
#include <lzham_static_lib.h> | ||
#include <lzham.h> | ||
|
||
int main() { | ||
unsigned char in[] = "Hello Conan Center!"; | ||
unsigned char out[sizeof(in)]; | ||
const std::string version(lzham_z_version()); | ||
|
||
lzham_z_stream stream; | ||
std::memset(&stream, 0, sizeof(stream)); | ||
stream.next_in = in; | ||
stream.avail_in = sizeof(in); | ||
stream.next_out = out; | ||
stream.avail_out = sizeof(out); | ||
if (lzham_z_deflateInit(&stream, LZHAM_Z_BEST_COMPRESSION) != LZHAM_Z_OK) | ||
return EXIT_FAILURE; | ||
std::cout << "lzham version: " << version << std::endl; | ||
|
||
if (lzham_z_deflate(&stream, LZHAM_Z_FULL_FLUSH) != LZHAM_Z_OK) | ||
return EXIT_FAILURE; | ||
|
||
return EXIT_SUCCESS; | ||
} |