Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd parser for publisher v4 prefix list #5713
Conversation
0ee1397
to
f019def
|
LGTM, a couple of comments. |
vendor/bat-native-ledger/src/bat/ledger/internal/common/brotli_helpers.cc
Outdated
Show resolved
Hide resolved
vendor/bat-native-ledger/src/bat/ledger/internal/publisher/prefix_util.cc
Show resolved
Hide resolved
vendor/bat-native-ledger/src/bat/ledger/internal/publisher/prefix_util.cc
Outdated
Show resolved
Hide resolved
|
|
||
| namespace { | ||
|
|
||
| class BrotliStreamDecoder { |
This comment has been minimized.
This comment has been minimized.
bridiver
Jun 2, 2020
Collaborator
there is already existing code for handling Brotli in chromium BrotliSourceStream
This comment has been minimized.
This comment has been minimized.
bridiver
Jun 2, 2020
Collaborator
in fact most of this code appears to be copied from chromium and there's no reason to do that. We can just use it directly
This comment has been minimized.
This comment has been minimized.
zenparsing
Jun 3, 2020
Author
Collaborator
For future reference, reusing BrotliSourceStream from net/filter would require creating a SourceStream class from a string (example here).
6b83cd3
to
ea33a94
| uint32 prefix_size = 1; | ||
|
|
||
| // The type of compression applied to the hash prefix list. | ||
| CompressionType compression_type = 2; |
This comment has been minimized.
This comment has been minimized.
zenparsing
Jun 3, 2020
Author
Collaborator
This approach of compressing the data inside of the protobuf message is inspired by Safe Browsing (see here), which embeds Rice-encoded prefix delta values into the message when the prefix lengths are 4 bytes. This message format will give us the option of moving in that direction in the future if we choose.
zenparsing commentedJun 2, 2020
Resolves brave/brave-browser#10056
Submitter Checklist:
npm run lint)git rebase master(if needed).git rebase -ito squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.