Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Old zlib does not support crc32_z. The difference between the two is that crc32() takes an input size as an unsigned int while crc32_z() takes as size_t. For our use case, size is guranteed to be short, so crc32() is safe to use.
- Loading branch information
1d24b70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If shard.len is short enough (less than 1MiB), then why we still need field len in struct Shard to be type i64? I think type i32 should be enough.
1d24b70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because we use i64 everywhere. See https://github.com/rui314/mold/blob/main/docs/coding-guidelines.md.
1d24b70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense. Thanks!