Skip to content

Commit c8f87ab

Browse files
author
Pavel Kovalenko
committed
Merge pull request #134 from gditeck/decouple-lzo
Decouple and update lzo.
2 parents 63faeba + 49d16a9 commit c8f87ab

32 files changed

+72
-12470
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "src/Externals/glew"]
1717
path = src/Externals/glew
1818
url = https://github.com/Armada651/glew.git
19+
[submodule "src/Externals/lzo"]
20+
path = src/Externals/lzo
21+
url = https://github.com/alexgdi/lzo.git

src/Externals/lzo

Submodule lzo added at 9cd30c8
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include "stdafx.h"
2+
#include "lzo_compressor.h"
3+
#include "lzo/lzo1x.h"
4+
5+
int lzo_compress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
6+
void *workMem, const void *dict, u32 dictSize)
7+
{
8+
return lzo1x_999_compress_dict((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize,
9+
workMem, (lzo_bytep)dict, dictSize);
10+
}
11+
12+
int lzo_decompress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
13+
void *workMem, const void *dict, u32 dictSize)
14+
{
15+
return lzo1x_decompress_dict_safe((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize,
16+
workMem, (lzo_bytep)dict, dictSize);
17+
}
18+
19+
int lzo_initialize()
20+
{ return lzo_init(); }
21+
22+
u32 lzo_get_workmem_size()
23+
{ return LZO1X_999_MEM_COMPRESS; }
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
#include "xrCore/xrCore.h"
3+
4+
XRCORE_API int lzo_compress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
5+
void *workMem, const void *dict, u32 dictSize);
6+
7+
XRCORE_API int lzo_decompress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
8+
void *workMem, const void *dict, u32 dict_len);
9+
10+
XRCORE_API int lzo_initialize();
11+
12+
XRCORE_API u32 lzo_get_workmem_size();

src/xrCore/rt_compressor.cpp renamed to src/xrCore/Compression/rt_compressor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55

6-
#include "rt_lzo1x.h"
6+
#include "lzo/lzo1x.h"
77

88

99
#define HEAP_ALLOC(var,size) \
File renamed without changes.

src/xrCore/rt_compressor9.cpp renamed to src/xrCore/Compression/rt_compressor9.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "stdafx.h"
22
#pragma hdrstop
33

4-
#include "rt_lzo1x.h"
4+
#include "lzo/lzo1x.h"
55

66

77
//==============================================================================

src/xrCore/rt_config1x.h

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/xrCore/rt_lzo1_d.ch

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)