Skip to content

Commit

Permalink
Merge pull request #134 from gditeck/decouple-lzo
Browse files Browse the repository at this point in the history
Decouple and update lzo.
  • Loading branch information
Pavel Kovalenko committed Apr 6, 2016
2 parents 63faeba + 49d16a9 commit c8f87ab
Show file tree
Hide file tree
Showing 32 changed files with 72 additions and 12,470 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "src/Externals/glew"]
path = src/Externals/glew
url = https://github.com/Armada651/glew.git
[submodule "src/Externals/lzo"]
path = src/Externals/lzo
url = https://github.com/alexgdi/lzo.git
1 change: 1 addition & 0 deletions src/Externals/lzo
Submodule lzo added at 9cd30c
23 changes: 23 additions & 0 deletions src/xrCore/Compression/lzo_compressor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "stdafx.h"
#include "lzo_compressor.h"
#include "lzo/lzo1x.h"

int lzo_compress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
void *workMem, const void *dict, u32 dictSize)
{
return lzo1x_999_compress_dict((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize,
workMem, (lzo_bytep)dict, dictSize);
}

int lzo_decompress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
void *workMem, const void *dict, u32 dictSize)
{
return lzo1x_decompress_dict_safe((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize,
workMem, (lzo_bytep)dict, dictSize);
}

int lzo_initialize()
{ return lzo_init(); }

u32 lzo_get_workmem_size()
{ return LZO1X_999_MEM_COMPRESS; }
12 changes: 12 additions & 0 deletions src/xrCore/Compression/lzo_compressor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once
#include "xrCore/xrCore.h"

XRCORE_API int lzo_compress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
void *workMem, const void *dict, u32 dictSize);

XRCORE_API int lzo_decompress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize,
void *workMem, const void *dict, u32 dict_len);

XRCORE_API int lzo_initialize();

XRCORE_API u32 lzo_get_workmem_size();
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@



#include "rt_lzo1x.h"
#include "lzo/lzo1x.h"


#define HEAP_ALLOC(var,size) \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdafx.h"
#pragma hdrstop

#include "rt_lzo1x.h"
#include "lzo/lzo1x.h"


//==============================================================================
Expand Down
114 changes: 0 additions & 114 deletions src/xrCore/rt_config1x.h

This file was deleted.

151 changes: 0 additions & 151 deletions src/xrCore/rt_lzo1_d.ch

This file was deleted.

Loading

0 comments on commit c8f87ab

Please sign in to comment.