PVer4 supports both RICE and RAW encoding. https://cs.chromium.org/chromium/src/components/safe_browsing_db/safebrowsing.proto?l=322 However, Chromium only supports RAW since there's no readily available RICE decoder library in Chromium codebase right now. This issue requires finding harder for such a library, or importing it, and then using it.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd572d1a6336bd67d2fdf49f1812073d33a81326 commit bd572d1a6336bd67d2fdf49f1812073d33a81326 Author: vakh <vakh@chromium.org> Date: Wed Jun 29 23:14:42 2016 Enforce RAW compression for PVer4 hash prefixes BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2113513002 Cr-Commit-Position: refs/heads/master@{#402987} [modify] https://crrev.com/bd572d1a6336bd67d2fdf49f1812073d33a81326/components/safe_browsing_db/v4_update_protocol_manager.cc [modify] https://crrev.com/bd572d1a6336bd67d2fdf49f1812073d33a81326/components/safe_browsing_db/v4_update_protocol_manager_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e71d408737100714f022dffe20dfb346d395bf9 commit 9e71d408737100714f022dffe20dfb346d395bf9 Author: vakh <vakh@chromium.org> Date: Thu Jul 28 21:24:14 2016 PVer4: Implements a RICE Decoder that converts a RICE encoded string, to a list of uint32_t values, or a sequence of 4-byte hash prefixes. For more details about RICE encoding, see: https://en.wikipedia.org/wiki/Golomb_coding BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2183433002 Cr-Commit-Position: refs/heads/master@{#408478} [modify] https://crrev.com/9e71d408737100714f022dffe20dfb346d395bf9/components/safe_browsing_db/BUILD.gn [modify] https://crrev.com/9e71d408737100714f022dffe20dfb346d395bf9/components/safe_browsing_db/DEPS [add] https://crrev.com/9e71d408737100714f022dffe20dfb346d395bf9/components/safe_browsing_db/v4_rice.cc [add] https://crrev.com/9e71d408737100714f022dffe20dfb346d395bf9/components/safe_browsing_db/v4_rice.h [add] https://crrev.com/9e71d408737100714f022dffe20dfb346d395bf9/components/safe_browsing_db/v4_rice_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/23c72ff7c5204be4cd59fc6599dad616217c39cf commit 23c72ff7c5204be4cd59fc6599dad616217c39cf Author: vakh <vakh@chromium.org> Date: Fri Jul 29 23:18:32 2016 Tiny: Enable v4_rice* to be built using GYP BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2196553002 Cr-Commit-Position: refs/heads/master@{#408800} [modify] https://crrev.com/23c72ff7c5204be4cd59fc6599dad616217c39cf/components/components_tests.gyp [modify] https://crrev.com/23c72ff7c5204be4cd59fc6599dad616217c39cf/components/safe_browsing_db.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/605ab1c3447ebe4749d80c20a7d38c01a59c0887 commit 605ab1c3447ebe4749d80c20a7d38c01a59c0887 Author: vakh <vakh@chromium.org> Date: Thu Aug 04 18:37:40 2016 Rice decode removals and additions and use them to update the store. Also: 1. Add histograms for decoding additions/removals. 2. Update the histogram for ApplyUpdateResult to include the new failure values. Please note that this CL does not enable RICE encoding yet since we still telling the server that we can only process RAW updates. I'll make that tiny change as a separate CL so that it is easier to rollback, if needed. BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2190233002 Cr-Commit-Position: refs/heads/master@{#409844} [modify] https://crrev.com/605ab1c3447ebe4749d80c20a7d38c01a59c0887/components/safe_browsing_db/v4_rice.cc [modify] https://crrev.com/605ab1c3447ebe4749d80c20a7d38c01a59c0887/components/safe_browsing_db/v4_store.cc [modify] https://crrev.com/605ab1c3447ebe4749d80c20a7d38c01a59c0887/components/safe_browsing_db/v4_store.h [modify] https://crrev.com/605ab1c3447ebe4749d80c20a7d38c01a59c0887/components/safe_browsing_db/v4_store_unittest.cc [modify] https://crrev.com/605ab1c3447ebe4749d80c20a7d38c01a59c0887/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1670eb02e8172d1750b70c50dbe3fb968e1f365f commit 1670eb02e8172d1750b70c50dbe3fb968e1f365f Author: vakh <vakh@chromium.org> Date: Fri Aug 19 02:18:13 2016 PVer4: DecodeHashes needs to sort the output of the Rice decoder Also: 1. Add tests to validate the Rice-decoder implementation. 2. Also, make the code for the case where the requested number of bits is greater than those left in the current_word_ easier to understand by calling GetNextBits recursively twice. BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2228393003 Cr-Commit-Position: refs/heads/master@{#413027} [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_rice.cc [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_rice.h [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_rice_unittest.cc [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_store.cc [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_store.h [modify] https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f/components/safe_browsing_db/v4_store_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f55c5b229c13a6266c16b2234af973c569303de1 commit f55c5b229c13a6266c16b2234af973c569303de1 Author: vakh <vakh@chromium.org> Date: Fri Aug 19 06:15:33 2016 Enable support for Rice encoding BUG= 543161 , 624567 Review-Url: https://codereview.chromium.org/2241863004 Cr-Commit-Position: refs/heads/master@{#413066} [modify] https://crrev.com/f55c5b229c13a6266c16b2234af973c569303de1/components/safe_browsing_db/v4_update_protocol_manager.cc [modify] https://crrev.com/f55c5b229c13a6266c16b2234af973c569303de1/components/safe_browsing_db/v4_update_protocol_manager_unittest.cc
Comment 1 by bugdroid1@chromium.org
, Jun 29 2016