Tags: Geod24/bitblob
Tags
v2.3.0: Proper hex check in fromString, `-preview=in` change This new release comes with two minor changes: - `fromString` will now properly check for hex characters, not just ASCII; This prevent a potential DoS when used with Vibe.d (user input could trigger an assert otherwise). - `toString` sink overload now takes its argument via `in` (as opposed to `scope const` as previously); The latter change only impact users who use `-preview=in`.
v2.1.0: Support for format string Support for format-like format string has been implemented. The default, `%s`, will still lead to `toString` formatting things the same way, namely the value `BitBlob!1(42)` will format as `0x2a`. Using `%x` will format as `2a`, `%X` will format as `%X` and all other formats will be interpreted as `%s`.
v2.0.0: Template argument to BitBlob changed from bits to bytes BitBlob previous accepted a number of bits as argument. However, it didn't support operations at the bit level, and expected that amount to be a multiple of 8. As most user code had to use `* 8` with the argument, this release just changes it to bytes.
v1.1.2: Added/improved message on assert errors While `assert` are not part of the package's interface, they tend to trigger during development. Confusing or absent message can confuse developers, so Bitblob will now show those better error messages on `assert` error. When calling `this(scope const ubyte[] binary, bool isLittleEnding = false)`: ``` ubyte[] argument to BitBlob!256LU constructor does not match the expected size of 32LU ``` When calling `this(scope const(char)[] hexstring)`: ``` Length of string passed to BitBlob!256LU constructor does not match the expected size of 32LU ```
v1.1.0: Improve documentation, usability, tests As seen in the sole commit of this release: ``` This commit introduce a lot more documentation (README, inline) in preparation for Bitblob's release. On the functional side, it also adds an opSlice overload, make the existing opIndex overload inout, remove the dependency on std.format, and add tests that we indeed do not allocate when using formattedWrite. ```