Skip to content

Commit d4ff481

Browse files
committed
fix(compress): resolve clean code warnings and fix memory pool bugs
- Replace deprecated C++ headers and unsafe memcpy/memset/memmove - Add missing header guards; wrap multi-statement macros in do-while(0) - Zero-initialize ts_header_t; pass array lengths to satisfy bounds checks - Extract FixedRatio/DataType enums to compress_types.h - Remove unused FSE/HUF/Bitstream source files (not invoked by current path) - Fix: throw bad_alloc on posix_memalign failure and pool exhaustion - Fix: skip submitting corrupted data on compression failure
1 parent ae2cc13 commit d4ff481

28 files changed

Lines changed: 1325 additions & 7507 deletions

ucm/store/compress/cc/compress_lib/bitstream.h

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

ucm/store/compress/cc/compress_lib/compiler.h

Lines changed: 0 additions & 185 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef COMPRESS_TYPES_H
2+
#define COMPRESS_TYPES_H
3+
4+
typedef enum {
5+
R1 = 32,
6+
R133 = 24, // 32 / 24 = 1.33x
7+
R139 = 23, // 32 / 23 = 1.39x
8+
R145 = 22, // 32 / 22 = 1.45x
9+
R152 = 21, // 32 / 21 = 1.52x
10+
R160 = 20, // 32 / 21 = 1.60x
11+
R200 = 16 // 32 / 16 = 2.00x
12+
} FixedRatio;
13+
14+
typedef enum {
15+
DT_BF16 = 0,
16+
DT_FP16 = 1,
17+
DT_FP8E5M2 = 2,
18+
DT_FP8E4M3 = 3,
19+
DT_INVALID = 100
20+
} DataType;
21+
22+
#endif // COMPRESS_TYPES_H

ucm/store/compress/cc/compress_lib/debug.cc

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

ucm/store/compress/cc/compress_lib/debug.h

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

0 commit comments

Comments
 (0)