binary 1.7.0
binary: ^1.7.0 copied to clipboard
Utilities for accessing binary data and bit manipulation in Dart and Flutter
CHANGELOG #
1.7.0 #
- Deprecated
<*>.shiftRightin favor of<*>.signedShiftRight>. - Deprecated
<*>.rotateRight, which was not correctly implemeted. - Added
<*>.rotateRightShiftto replacerotateRight. - Updated some doc comments that referred to incorrect JavaScript operators.
1.6.0 #
- Added
<BinaryInt|BinaryList|Integral>.toggleBit. - Deprecated
Integral.setBitsin favor of.bitsSet.
1.5.0 #
- Added
BitPatternGroup's constructor, deprecating.toGroup(). - Added
BitPart.zeroandBitPart.oneand deprecatedBitPart(int).
1.4.0 #
- Added
List<int>.toBits()as a replacement forList<int>.parseBits(). - Added
String.bitsas a replacement forString.parseBits(). - Deprecated
List<int>.parseBits()andString.parseBits(). - Deprecated
int.as[U]Int{N}functions in favor of manual wrapping.
1.3.0 #
- Added comparison operators (
>,>=,<,<=) toIntegral. - Added
<Integral>.checkRangeand<Integral>.assertRangestatic methods. - Added the abiltiy to extend
Integralto create custom-sized integers.
1.2.2 #
- Fixed a bug where
_InterpretedBitPattern(theBitPatterngenerated fromBitPatternBuilder) was sorted in an incorrect order (ascending instead of descending), which would notmatchcorrectly in some scenarios.
1.2.1 #
- Fixed a bug where
BitPatternBuilder.parse('00AA_AABB')incorrectly threw aFormatExceptionassuming that_deliniated the end of theAvariable segment and the subsequentAwas a new segment (which is invalid). It now correctly parses the above as just two variable segments (AAAA,BB).
1.2.0 #
-
Added
BitPatternBuilder.parse, a simplified-format for buildingBitPatternfrom a string of alpha-numeric characters, where0and1are pre-defined (static) flags for matching, and charaters are variable segments:// Create a BitPattern (Data Structures). final $01V = BitPatternBuilder([ BitPart(0), BitPart(1), BitPart.v(1, 'A'), ]).build(); // Create a BitPattern (Parse a String). final $01Vs = BitPatternBuilder.parse('01A').build(); print($01V == $01Vs); // true -
Fixed a bug where it was not possible to capture variables that were >8-bit.
1.1.0 #
- Added
BitPatternBuilder,BitPattern,BitPart: a new API in order to build bit-based patterns and match against arbitrary sets of bits, optionally extracting variable names. This API is intended to make it easier to build apps and packages around implementing emulators and other decoders.
1.0.0 #
A large update to bring into line for Dart 2, as well take advantage of newer langauge features like extension methods over top-level methods. As a result, the new API is not compatible with previous versions, but migration should be trivial.
0.1.3 #
- Added
arithmeticShiftRight
0.1.2 #
- Moved into a standalone repository (outside of
gba.dart). - Added
signExtendas a method toIntegral. - Added
areSet. - Added
msb.
0.1.1 #
- Added
signExtend
0.1.0 #
- Fixed a bug where
int128anduint128only had a length of 64.
0.0.4 #
- Updated the documentation and README.
0.0.3 #
- Added
isZero.
0.0.2 #
- Added
isNegative,hasCarryBit,doesAddOverflow,doesSubOverflow,mask. - Added
parseBits.
0.0.1 #
- Add top-level
isSetandisClear,Integral#isSet,Integral#isClear. - Add checked-mode range checks to
bitChunkandbitRange. - Fix a bug in the implementation of
bitChunkandbitRange. - Added a top-level
fromBitsandIntegral#fromBits
0.0.0 #
- Initial commit, feedback welcome!