@@ -184,6 +184,7 @@ Drivers MUST validate vector metadata and raise an error if any invariant is vio
184184
185185- Padding MUST be 0 for all dtypes where padding doesn’t apply, and MUST be within \[ 0, 7\] for PACKED_BIT.
186186- A PACKED_BIT vector MUST NOT be empty if padding is in the range \[ 1, 7\] .
187+ - For a PACKED_BIT vector, ignored bits must be zero.
187188- When unpacking binary data into a FLOAT32 Vector structure, the length of the binary data following the dtype and
188189 padding MUST be a multiple of 4 bytes.
189190
@@ -237,16 +238,26 @@ See the [README](tests/README.md) for tests.
237238## FAQ
238239
239240- What MongoDB Server version does this apply to?
241+
240242 - Files in the "specifications" repository have no version scheme. They are not tied to a MongoDB server version.
243+
241244- In PACKED_BIT, why would one choose to use integers in \[ 0, 256)?
245+
242246 - This follows a well-established precedent for packing binary-valued arrays into bytes (8 bits), This technique is
243247 widely used across different fields, such as data compression, communication protocols, and file formats, where
244248 you want to store or transmit binary data more efficiently by grouping 8 bits into a single byte (uint8). For an
245249 example in Python, see
246250 [ numpy.unpackbits] ( https://numpy.org/doc/2.0/reference/generated/numpy.unpackbits.html#numpy.unpackbits ) .
247251
252+ - In PACKED_BIT, why are ignored bits required to be zero?
253+
254+ - To ensure the same data representation has the same encoding. For drivers supporting comparison operations, this
255+ avoids comparing different unused bits.
256+
248257## Changelog
249258
259+ - 2025-04-08: In PACKED_BIT vectors, ignored bits must be zero.
260+
250261- 2025-03-07: Update tests to use Extended JSON representation of +/-Infinity. (DRIVERS-3095)
251262
252263- 2025-02-04: Update validation for decoding into a FLOAT32 vector.
0 commit comments