Don't udpate LastOverSpeedTick when using aqua_speed
[ryzomcore.git] / nel / 3rdparty / seven_zip / Bra.h
blob855e37a6b5018e07b5e049b014401069d2158747
1 /* Bra.h -- Branch converters for executables
2 2013-01-18 : Igor Pavlov : Public domain */
4 #ifndef __BRA_H
5 #define __BRA_H
7 #include "7zTypes.h"
9 EXTERN_C_BEGIN
12 These functions convert relative addresses to absolute addresses
13 in CALL instructions to increase the compression ratio.
15 In:
16 data - data buffer
17 size - size of data
18 ip - current virtual Instruction Pinter (IP) value
19 state - state variable for x86 converter
20 encoding - 0 (for decoding), 1 (for encoding)
22 Out:
23 state - state variable for x86 converter
25 Returns:
26 The number of processed bytes. If you call these functions with multiple calls,
27 you must start next call with first byte after block of processed bytes.
29 Type Endian Alignment LookAhead
31 x86 little 1 4
32 ARMT little 2 2
33 ARM little 4 0
34 PPC big 4 0
35 SPARC big 4 0
36 IA64 little 16 0
38 size must be >= Alignment + LookAhead, if it's not last block.
39 If (size < Alignment + LookAhead), converter returns 0.
41 Example:
43 UInt32 ip = 0;
44 for ()
46 ; size must be >= Alignment + LookAhead, if it's not last block
47 SizeT processed = Convert(data, size, ip, 1);
48 data += processed;
49 size -= processed;
50 ip += processed;
54 #define x86_Convert_Init(state) { state = 0; }
55 SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding);
56 SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
57 SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
58 SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
59 SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
60 SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
62 EXTERN_C_END
64 #endif