Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
3846daf6
Commit
3846daf6
authored
1 year ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
Change parameter types in compress_chunk_cmp_size_bound()
parent
1c555bf3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!26
Adapt cmp_tool to the chunk decompression
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/cmp_chunk.h
+2
-1
2 additions, 1 deletion
lib/cmp_chunk.h
lib/icu_compress/cmp_icu.c
+3
-3
3 additions, 3 deletions
lib/icu_compress/cmp_icu.c
with
5 additions
and
4 deletions
lib/cmp_chunk.h
+
2
−
1
View file @
3846daf6
...
...
@@ -107,7 +107,7 @@ struct cmp_par {
* @returns maximum compressed size for a chunk compression; 0 on error
*/
uint32_t
compress_chunk_cmp_size_bound
(
void
*
chunk
,
uint32
_t
chunk_size
);
uint32_t
compress_chunk_cmp_size_bound
(
const
void
*
chunk
,
size
_t
chunk_size
);
/**
...
...
@@ -156,6 +156,7 @@ int32_t compress_chunk(void *chunk, uint32_t chunk_size,
uint32_t
*
dst
,
uint32_t
dst_capacity
,
const
struct
cmp_par
*
cmp_par
);
/**
* @brief set the model id and model counter in the compression entity header
*
...
...
This diff is collapsed.
Click to expand it.
lib/icu_compress/cmp_icu.c
+
3
−
3
View file @
3846daf6
...
...
@@ -2714,7 +2714,7 @@ int32_t compress_chunk(void *chunk, uint32_t chunk_size,
* @returns maximum compressed size for a chunk compression; 0 on error
*/
uint32_t
compress_chunk_cmp_size_bound
(
void
*
chunk
,
uint32
_t
chunk_size
)
uint32_t
compress_chunk_cmp_size_bound
(
const
void
*
chunk
,
size
_t
chunk_size
)
{
int32_t
read_bytes
;
uint32_t
num_col
=
0
;
...
...
@@ -2726,7 +2726,7 @@ uint32_t compress_chunk_cmp_size_bound(void *chunk, uint32_t chunk_size)
for
(
read_bytes
=
0
;
read_bytes
<
(
int32_t
)
chunk_size
-
COLLECTION_HDR_SIZE
;
read_bytes
+=
cmp_col_get_size
((
struct
collection_hdr
*
)((
uint8_t
*
)
chunk
+
read_bytes
)))
read_bytes
+=
cmp_col_get_size
((
const
struct
collection_hdr
*
)((
const
uint8_t
*
)
chunk
+
read_bytes
)))
num_col
++
;
...
...
@@ -2735,7 +2735,7 @@ uint32_t compress_chunk_cmp_size_bound(void *chunk, uint32_t chunk_size)
return
0
;
}
return
COMPRESS_CHUNK_BOUND
(
chunk_size
,
num_col
);
return
COMPRESS_CHUNK_BOUND
(
(
uint32_t
)
chunk_size
,
num_col
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment