dredless 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4498,7 +4498,8 @@
4498
4498
  }
4499
4499
  readFieldDelta() {
4500
4500
  const raw = this.readUnsigned();
4501
- return (raw & 1) === 0 ? raw / 2 : -(raw >> 1);
4501
+ const magnitude = Math.floor(raw / 2);
4502
+ return raw % 2 === 0 ? magnitude : -magnitude;
4502
4503
  }
4503
4504
  readBlob() {
4504
4505
  const length = this.readStreamInt();
@@ -4556,19 +4557,13 @@
4556
4557
  };
4557
4558
  var LABEL_STATE_SPEC = {
4558
4559
  name: "label_state",
4559
- read(reader, record, mask) {
4560
- if (mask & 1) record.blob20 = reader.readBlob();
4561
- if (mask & 2) {
4562
- if (mask & 1) record.blob24 = reader.readBlob();
4563
- else record.q20 = (record.q20 || 0) + reader.readFieldDelta();
4564
- }
4565
- if (mask & 4) record.q28 = (record.q28 || 0) + reader.readFieldDelta();
4566
- if (mask & 8) {
4567
- if (mask & 1) record.q32 = (record.q32 || 0) + reader.readFieldDelta();
4568
- else record.blob28 = reader.readBlob();
4569
- }
4570
- if (mask & 16) record.q36 = (record.q36 || 0) + reader.readFieldDelta();
4571
- }
4560
+ // Packed flag first, two independent text blobs,
4561
+ // then two numeric deltas. Field types never depend on another mask bit.
4562
+ // Keep the existing summary keys for the strings and colors.
4563
+ packedBeforeValues: true,
4564
+ packedBits: [{ bit: 16, offset: 36 }],
4565
+ blobs: [{ bit: 1, offset: 20 }, { bit: 2, offset: 24 }],
4566
+ fields: numericFields({ 4: 28, 8: 32 })
4572
4567
  };
4573
4568
  var SIMPLE_LABEL_STATE_SPEC = {
4574
4569
  name: "label_state",