Commit graph

10 commits

Author SHA1 Message Date
Dave Collins
1b73e9828d Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
Josh Rickmar
dca623d4ef Optimize base58 decoding.
This change introduces an autogenerated base58 digit table to remove
the need to find the index of a character in the modified base58
alphabet each time.  Additionally, it removes some unnecessary big
integer allocations to cut down on the GC churn.

Before:
BenchmarkBase58Encode         20          64998995 ns/op           0.08 MB/s
BenchmarkBase58Decode         50          35965928 ns/op           0.19 MB/s

Now:
BenchmarkBase58Encode         20          64644351 ns/op           0.08 MB/s
BenchmarkBase58Decode        200           7914748 ns/op           0.86 MB/s
2015-01-24 14:59:51 -05:00
Dave Collins
f80c4d718d Update btcutil import paths in README.md files. 2015-01-15 21:35:29 -06:00
Dave Collins
506d333934 Update btcutil import paths to new location. 2015-01-15 15:13:38 -06:00
Dave Collins
97fea16721 Add package documentation for base58 package.
This commit adds a doc.go file in the base58 package which provides
package documentation for godoc.
2014-12-22 12:36:34 -06:00
Dave Collins
ff8cbd1786 Add testable examples for base58 package.
This commit creates and an example test file for the baes58 package that
integrates nicely with Go's example tooling.

This allows the example output to be tested as a part of running the
normal Go tests to help ensure it doesn't get out of date with the code.
2014-12-22 11:58:06 -06:00
Dave Collins
cef307c87e Complete base58 migration to new package. 2014-12-22 10:56:00 -06:00
Dave Collins
fffd6a2e87 Add benchmarks to base58 package. 2014-12-22 10:45:21 -06:00
Dave Collins
a630ef8247 A few minor modifications to new base58 package.
- Call out in README.md that this is modified base58 (it's not the same as
  normal base58)
- Remove the blurb about test_coverage.txt since it is no longer needed
  now that the repo now has coveralls integrated
- Rename base58_check[_test].go -> basecheck[_test].go.  Since Go treats
  _<ext> special in some cases like for tests and conditional OS and
  architecture compilation, it's a good idea to avoid naming files with
  them to ensure a new special meaning doesn't break builds in the future
2014-12-22 10:29:07 -06:00
benma
a72a54be16 Create a new sub-package base58.
It consists of the previous base58 implementation and new
base58 check encoding/decoding functions.
2014-12-22 11:43:07 +01:00