Kevin Atkinson
9831436a6f
Change string representation to represent actual binary representation.
2018-08-31 00:35:47 -04:00
Kevin Atkinson
d7974d2277
Export version() method, various other code cleanups.
2018-08-31 00:34:19 -04:00
dignifiedquire
e153340e5a
feat: use CIDs as their byte representation instead of a struct
2018-08-31 00:33:47 -04:00
Kevin Atkinson
bea727bbd1
Enhance tests.
2018-08-30 00:30:14 -04:00
Kevin Atkinson
9091e50b29
Rename Format method to Encode.
2018-08-30 00:30:14 -04:00
Kevin Atkinson
a0b3b11e63
Create a new Format method that is like StringOfBase but never errors
2018-08-30 00:30:14 -04:00
Steven Allen
d6e0b4e5a7
add String benchmark
...
We call String all over the place so we should make sure it remains fast.
2018-08-10 16:23:25 -07:00
Hector Sanjuan
8028fee095
Add Decred codecs
...
0xe0 and 0xe1 have been assigned to Decred block and tx in the
multicodecs table. https://github.com/multiformats/multicodec/pull/78
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai >
2018-07-23 19:28:53 +02:00
Fritz Schneider
d204c18f7a
make test a little more clear
2018-07-11 11:24:59 -10:00
Fritz Schneider
b41162260a
fix typo
2018-07-11 11:21:16 -10:00
Fritz Schneider
9cb0b7bcae
use value receiver
2018-07-11 11:20:53 -10:00
Steven Allen
63d4b33fcf
Add CID Prefix constructors.
...
One can now generate a CID by calling:
```go
cid.NewPrefixV1(cid.DagCBOR, mh.SHA_256).Sum(data)
```
Lots of code was already doing this by manually constructing CID Prefixes but
that tends to be a bit verbose and error prone.
2017-08-30 12:42:46 -07:00
Herman Junge
7d345d4817
Switch from byte to uint64
2017-06-30 10:00:21 -04:00
Herman Junge
3c03b9e581
Improve tests
2017-06-30 03:01:26 -04:00
Herman Junge
f6990413f7
Added map of string to codecs
2017-06-29 21:00:23 -04:00
Łukasz Magiera
b42583c8bf
Add StringOfBase function
2017-06-19 17:25:51 +02:00
Jeromy
92cac2f002
add an example to the tests to play around with the feature
2017-03-18 19:17:44 -07:00
Jeromy
7bcaf9264a
do cid json handling in this package
2017-02-05 23:52:06 -08:00
Jeromy
4ff5ee2b99
Update go-multibase, multihash. add test for hex
2017-02-02 18:39:00 -08:00
Jeromy
f623f824db
fix build failures i introduced
2016-11-23 10:04:56 -08:00
Jakub Sztandera
9116bf8025
Fix lengths in prefix too
2016-11-17 19:16:05 +01:00
Jakub Sztandera
5da6d87c58
Add test for max lenght varint
2016-11-17 18:53:33 +01:00
Lars Gierth
d0e0822854
Add Parse func accepting various types
2016-11-17 17:25:57 +01:00
Jeromy
02ce4e9b23
fix decoding of empty strings
2016-10-24 17:30:53 -07:00
Jeromy
8677934d48
add small test to fuzz cid creation routines
2016-10-09 12:19:14 -07:00
Jeromy
961f0fe7a8
add 'Prefix' object and some more helper routines
2016-10-08 21:17:59 -07:00
Jeromy
6c7d9e3de2
gx publish 0.5.2
2016-10-05 12:08:42 -07:00
Jeromy
be0c62535f
add proper gx deps
2016-09-04 11:48:13 -07:00
Jeromy
7105263bfa
some improvements from integrating into go-ipfs
2016-08-31 19:47:09 -07:00
Jeromy
cc13075232
add handling for V0 cids
2016-08-30 10:04:50 -07:00
Jeromy
258ab793f1
first implementation
2016-08-26 17:56:12 -07:00