Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Issue 2538553003: Add base128 encoding library. (Closed)

Created:
4 years ago by iannucci
Modified:
4 years ago
Reviewers:
dnj, Vadim Sh.
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

Add base128 encoding library. This will be used to safely encode datastore Key string ids, which are supposedly UTF8 encoded. This base128 implementation only ever uses the lower 7 bits, and so should always roundtrip through UTF8 without any drama. This is also designed to retain sort-order between sorted and unsorted forms (that is: the data encoded and unencoded should memcmp sort the same way). Unfortunately other schemes (such as base64/ascii85) don't preserve this property. R=dnj@chromium.org, vadimsh@chromium.org BUG=669308 Committed: https://github.com/luci/luci-go/commit/dd65e8b8494aedf0eafff0ac6894a0c99e0a62ba

Patch Set 1 #

Total comments: 21

Patch Set 2 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -0 lines) Patch
A common/data/base128/base128.go View 1 1 chunk +108 lines, -0 lines 0 comments Download
A common/data/base128/base128_test.go View 1 chunk +91 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
iannucci
4 years ago (2016-11-29 01:18:43 UTC) #1
dnj
looks mostly good, comments. https://codereview.chromium.org/2538553003/diff/1/common/data/base128/base128.go File common/data/base128/base128.go (right): https://codereview.chromium.org/2538553003/diff/1/common/data/base128/base128.go#newcode31 common/data/base128/base128.go:31: if cap(dst) < ret { ...
4 years ago (2016-11-29 02:03:14 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2538553003/20001
4 years ago (2016-11-29 02:14:49 UTC) #4
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years ago (2016-11-29 02:14:50 UTC) #6
iannucci
https://codereview.chromium.org/2538553003/diff/1/common/data/base128/base128.go File common/data/base128/base128.go (right): https://codereview.chromium.org/2538553003/diff/1/common/data/base128/base128.go#newcode31 common/data/base128/base128.go:31: if cap(dst) < ret { On 2016/11/29 02:03:13, dnj ...
4 years ago (2016-11-29 02:14:55 UTC) #7
dnj
lgtm
4 years ago (2016-11-29 02:16:10 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2538553003/20001
4 years ago (2016-11-29 02:16:27 UTC) #10
commit-bot: I haz the power
4 years ago (2016-11-29 02:23:28 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://github.com/luci/luci-go/commit/dd65e8b8494aedf0eafff0ac6894a0c99e0a62ba

Powered by Google App Engine
This is Rietveld 408576698