Only the most important changes more recent than version 0.6 are noted here.
Version 1.7.0-BETA:
- Improved compatibility with version 3584 WIM / ESD files.
+ Improved compatibility with version 3584 WIM / ESD files:
+ - Add support for reading and writing multiple solid blocks per
+ archive, which WIMGAPI/DISM can create when appending an image.
+ - Correctly create solid blocks larger than 4 GiB.
Performance improvements, including for extraction.
void
lzms_init_slots(void)
{
- static bool done = false;
- static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-
- if (unlikely(!done)) {
- pthread_mutex_lock(&mutex);
- if (!done) {
- lzms_compute_slots();
- done = true;
- }
- pthread_mutex_unlock(&mutex);
- }
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
+
+ pthread_once(&once, lzms_compute_slots);
}
static s32
* lzms_range_encoder_raw. */
struct lzms_range_encoder_raw *rc;
- /* Bits recently encoded by this range encoder. This are used as in
+ /* Bits recently encoded by this range encoder. This is used as an
* index into @prob_entries. */
u32 state;
static void
lzms_init_rc_costs(void)
{
- static bool done = false;
- static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-
- if (unlikely(!done)) {
- pthread_mutex_lock(&mutex);
- if (!done) {
- lzms_do_init_rc_costs();
- done = true;
- }
- pthread_mutex_unlock(&mutex);
- }
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
+
+ pthread_once(&once, lzms_do_init_rc_costs);
}
/*
reserve_size = expected_num_chunk_entries *
get_chunk_entry_size(res_expected_size,
0 != (ctx->write_resource_flags &
- WIM_RESHDR_FLAG_PACKED_STREAMS));
+ WRITE_RESOURCE_FLAG_PACK_STREAMS));
if (ctx->write_resource_flags & WRITE_RESOURCE_FLAG_PACK_STREAMS)
reserve_size += sizeof(struct alt_chunk_table_header_disk);
memset(ctx->chunk_csizes, 0, reserve_size);
chunk_entry_size = get_chunk_entry_size(res_actual_size,
0 != (ctx->write_resource_flags &
- WIM_RESHDR_FLAG_PACKED_STREAMS));
+ WRITE_RESOURCE_FLAG_PACK_STREAMS));
typedef le64 __attribute__((may_alias)) aliased_le64_t;
typedef le32 __attribute__((may_alias)) aliased_le32_t;