Skip to content

Commit

Permalink
Feature/dart (#22)
Browse files Browse the repository at this point in the history
update version
  • Loading branch information
zhangwei217245 authored Sep 5, 2024
1 parent 8e1962a commit 80ab501
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/commons/serde/bulki/bulki.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 80ab501

Please sign in to comment.