extlz4 0.2.4.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.ja.md +5 -0
- data/README.md +3 -3
- data/contrib/lz4/INSTALL +1 -0
- data/contrib/lz4/NEWS +13 -0
- data/contrib/lz4/README.md +1 -0
- data/contrib/lz4/circle.yml +0 -1
- data/contrib/lz4/lib/README.md +28 -28
- data/contrib/lz4/lib/lz4.c +139 -53
- data/contrib/lz4/lib/lz4.h +85 -69
- data/contrib/lz4/lib/lz4frame.c +63 -57
- data/contrib/lz4/lib/lz4frame_static.h +27 -16
- data/contrib/lz4/lib/lz4hc.c +208 -122
- data/contrib/lz4/lib/lz4hc.h +23 -29
- data/contrib/lz4/lib/lz4opt.h +247 -257
- data/contrib/lz4/lib/xxhash.c +16 -16
- data/lib/extlz4/version.rb +1 -1
- metadata +1 -1
data/contrib/lz4/lib/xxhash.c
CHANGED
@@ -115,21 +115,21 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcp
|
|
115
115
|
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
|
116
116
|
#endif
|
117
117
|
|
118
|
-
#ifndef
|
118
|
+
#ifndef XXH_FORCE_INLINE
|
119
119
|
# ifdef _MSC_VER /* Visual Studio */
|
120
|
-
# define
|
120
|
+
# define XXH_FORCE_INLINE static __forceinline
|
121
121
|
# else
|
122
122
|
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
|
123
123
|
# ifdef __GNUC__
|
124
|
-
# define
|
124
|
+
# define XXH_FORCE_INLINE static inline __attribute__((always_inline))
|
125
125
|
# else
|
126
|
-
# define
|
126
|
+
# define XXH_FORCE_INLINE static inline
|
127
127
|
# endif
|
128
128
|
# else
|
129
|
-
# define
|
129
|
+
# define XXH_FORCE_INLINE static
|
130
130
|
# endif /* __STDC_VERSION__ */
|
131
131
|
# endif /* _MSC_VER */
|
132
|
-
#endif /*
|
132
|
+
#endif /* XXH_FORCE_INLINE */
|
133
133
|
|
134
134
|
|
135
135
|
/* *************************************
|
@@ -223,7 +223,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
|
|
223
223
|
*****************************/
|
224
224
|
typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment;
|
225
225
|
|
226
|
-
|
226
|
+
XXH_FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
|
227
227
|
{
|
228
228
|
if (align==XXH_unaligned)
|
229
229
|
return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
|
@@ -231,7 +231,7 @@ FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_a
|
|
231
231
|
return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr);
|
232
232
|
}
|
233
233
|
|
234
|
-
|
234
|
+
XXH_FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian)
|
235
235
|
{
|
236
236
|
return XXH_readLE32_align(ptr, endian, XXH_unaligned);
|
237
237
|
}
|
@@ -266,7 +266,7 @@ static U32 XXH32_round(U32 seed, U32 input)
|
|
266
266
|
return seed;
|
267
267
|
}
|
268
268
|
|
269
|
-
|
269
|
+
XXH_FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align)
|
270
270
|
{
|
271
271
|
const BYTE* p = (const BYTE*)input;
|
272
272
|
const BYTE* bEnd = p + len;
|
@@ -381,7 +381,7 @@ XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, unsigned int s
|
|
381
381
|
}
|
382
382
|
|
383
383
|
|
384
|
-
|
384
|
+
XXH_FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state, const void* input, size_t len, XXH_endianess endian)
|
385
385
|
{
|
386
386
|
const BYTE* p = (const BYTE*)input;
|
387
387
|
const BYTE* const bEnd = p + len;
|
@@ -451,7 +451,7 @@ XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void*
|
|
451
451
|
|
452
452
|
|
453
453
|
|
454
|
-
|
454
|
+
XXH_FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianess endian)
|
455
455
|
{
|
456
456
|
const BYTE * p = (const BYTE*)state->mem32;
|
457
457
|
const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize;
|
@@ -583,7 +583,7 @@ static U64 XXH_swap64 (U64 x)
|
|
583
583
|
}
|
584
584
|
#endif
|
585
585
|
|
586
|
-
|
586
|
+
XXH_FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
|
587
587
|
{
|
588
588
|
if (align==XXH_unaligned)
|
589
589
|
return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
|
@@ -591,7 +591,7 @@ FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_a
|
|
591
591
|
return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr);
|
592
592
|
}
|
593
593
|
|
594
|
-
|
594
|
+
XXH_FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian)
|
595
595
|
{
|
596
596
|
return XXH_readLE64_align(ptr, endian, XXH_unaligned);
|
597
597
|
}
|
@@ -626,7 +626,7 @@ static U64 XXH64_mergeRound(U64 acc, U64 val)
|
|
626
626
|
return acc;
|
627
627
|
}
|
628
628
|
|
629
|
-
|
629
|
+
XXH_FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align)
|
630
630
|
{
|
631
631
|
const BYTE* p = (const BYTE*)input;
|
632
632
|
const BYTE* const bEnd = p + len;
|
@@ -750,7 +750,7 @@ XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, unsigned long
|
|
750
750
|
return XXH_OK;
|
751
751
|
}
|
752
752
|
|
753
|
-
|
753
|
+
XXH_FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, const void* input, size_t len, XXH_endianess endian)
|
754
754
|
{
|
755
755
|
const BYTE* p = (const BYTE*)input;
|
756
756
|
const BYTE* const bEnd = p + len;
|
@@ -815,7 +815,7 @@ XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void*
|
|
815
815
|
return XXH64_update_endian(state_in, input, len, XXH_bigEndian);
|
816
816
|
}
|
817
817
|
|
818
|
-
|
818
|
+
XXH_FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state, XXH_endianess endian)
|
819
819
|
{
|
820
820
|
const BYTE * p = (const BYTE*)state->mem64;
|
821
821
|
const BYTE* const bEnd = (const BYTE*)state->mem64 + state->memsize;
|
data/lib/extlz4/version.rb
CHANGED