From 80ab501750c125e1f4daaa6582e1e4135245e3a6 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Thu, 5 Sep 2024 14:22:28 -0400 Subject: [PATCH] Feature/dart (#22) update version --- src/commons/serde/bulki/bulki.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/commons/serde/bulki/bulki.c b/src/commons/serde/bulki/bulki.c index c24e6f37..506ac560 100644 --- a/src/commons/serde/bulki/bulki.c +++ b/src/commons/serde/bulki/bulki.c @@ -7,9 +7,6 @@ get_BULKI_Entity_size(BULKI_Entity *bulk_entity) if (bulk_entity == NULL) { return 0; } - // initial size -> size: vle, class & type : 8bits, count: vle - // size_t size = BULKI_vle_encoded_uint_size((uint64_t)bulk_entity->size) + sizeof(uint8_t) + - // BULKI_vle_encoded_uint_size((uint64_t)bulk_entity->count); size_t size = sizeof(int8_t) * 2 + sizeof(uint64_t) * 2; @@ -53,19 +50,7 @@ get_BULKI_size(BULKI *bulki) if (bulki == NULL) { return 0; } - size_t size = 0; - - // Calculate the size for each VLE-encoded field - // size += BULKI_vle_encoded_uint_size(bulki->totalSize); - // size += BULKI_vle_encoded_uint_size(bulki->numKeys); - // size += BULKI_vle_encoded_uint_size(bulki->header->headerSize); - // size += BULKI_vle_encoded_uint_size(bulki->data->dataSize); - - // Add the size of the offsets if they are VLE-encoded as well - // size += BULKI_vle_encoded_uint_size(bulki->header->headerSize); // Assuming offsets are VLE-encoded - // size += BULKI_vle_encoded_uint_size(bulki->data->dataSize); // Assuming offsets are VLE-encoded - - size += sizeof(uint64_t) * 6; + size_t size = sizeof(uint64_t) * 6; // totalSize, numKeys, headerSize, dataSize, headerOffset, dataOffset for (size_t i = 0; i < bulki->numKeys; i++) { size += get_BULKI_Entity_size(&bulki->header->keys[i]);