Closed shamblett closed 1 year ago
How to work with timestamps?
If Map contains this:
6: 1579254859548
//milliseconds
Bignums not supported message occurs in log.
This looks like a bug, timestamps aren't bignums, that said things have moved on since this package was released, Dart does now support bignums, this area needs to be addressed.
OK, bignum encoding support now added, there is a writeBignum encoder method that takes a BigInt and the writeInt method now automativcally encodes to a bignum if the integer value is large enough. Yo can now use the new builder classes to encode lists and maps with complex types, refer to issue 10.
Package re published at version 3.1.0
Hello, Gratitude for this library. It might just be on my computer but when trying to write an Int which is greater that 2^32 but less than 2^64 (Uint64) I see the class is using the final int two64-variable in the cbor_constants.dart-file, set to: pow(2,64). When i try to print(pow(2,64)) in a test file. i get the value: 0. This means that this library is coding ints that are greater than 2^32 and less than 2^64 as a BigNum in the stead of coding them as a Uint64.
OK I'll have a look at this.
I think I've got a solution for this, I've updated the unit tests and all is passing OK. I'll just do some final checks and hopefully re publish the package shortly.
Awesome.
OK< I still have some concerns about negative bignum handling but I think your uint64 problem has been fixed. I've re published the package at version 4.0.2, please upgrade and re test.
Review the support for bignums in the package, at the moment these are supported only through tags