-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAssetBundleDecoder.h
More file actions
49 lines (41 loc) · 1.24 KB
/
AssetBundleDecoder.h
File metadata and controls
49 lines (41 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
Unity AssetBundle decompressor
support: unity4.7+, unity5.3+ lzma format
platform: x86, x64, ios, android
warning: decompress chunk based bundle not test
Copyright (c) 2014 - 2018, lujian
All rights reserved.
email: lujian_niewa@sina.com, 345005607@qq.com
*/
#ifndef __ASSETBUNDLE_UTIL_H__
#define __ASSETBUNDLE_UTIL_H__
#include <inttypes.h>
#if defined( BUILD_AS_DLL )
#if defined( ABD_CORE ) || defined( ABD_LIB )
#define ABD_API __declspec( dllexport )
#else
#define ABD_API __declspec( dllimport )
#endif
#else
#define ABD_API extern
#endif
/*AB_Decompress return values*/
#define ABDEC_ERROR_DISKSPACE_FAIL -6
#define ABDEC_ERROR_FATAL -5
#define ABDEC_ERROR_DEC_FAILED -4
#define ABDEC_ERROR_OUTPUT -3
#define ABDEC_ERROR_INVALID_BUNDLE -2
#define ABDEC_ERROR_INPUT -1
#define ABDEC_ERROR_OK 0
#define ABDEC_ERROR_OK_BYPASS 1
/*decompress assetbundle to uncompressed file*/
ABD_API Int32 AB_Decompress(
const char* inputFilePath,
const char* outputFilePath,
Int32* outFileSize,
void* context );
/*callback for disk space checking before write uncompressed data to disk*/
typedef Int32( *RequireDiskSpaceHook )( Int32 size, void* context );
ABD_API Int32 AB_SetupRequireDiskSpaceHook( RequireDiskSpaceHook hook );
#endif
/*EOF*/