File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -140,10 +140,8 @@ impl SerializedSearchIndex {
140
140
column_name. as_bytes ( ) ,
141
141
column_path. clone ( ) ,
142
142
& mut |_id, item| {
143
- let mut decoded = Vec :: new ( ) ;
144
- read_base64_from_bytes ( item, & mut decoded) ?;
145
143
column. push (
146
- RoaringBitmap :: from_bytes ( & decoded )
144
+ RoaringBitmap :: from_bytes ( item )
147
145
. map ( |( bitmap, _) | bitmap. to_vec ( ) )
148
146
. unwrap_or_default ( ) ,
149
147
) ;
@@ -731,12 +729,7 @@ impl SerializedSearchIndex {
731
729
let mut buf = Vec :: new ( ) ;
732
730
stringdex_internals:: encode:: write_bitmap_to_bytes ( & value, & mut buf)
733
731
. unwrap ( ) ;
734
- let mut serialized_result = Vec :: new ( ) ;
735
- stringdex_internals:: encode:: write_base64_to_bytes (
736
- & buf,
737
- & mut serialized_result,
738
- ) ;
739
- serialized_result
732
+ buf
740
733
}
741
734
} ) ,
742
735
)
Original file line number Diff line number Diff line change @@ -1751,22 +1751,20 @@ class DocSearch {
1751
1751
}
1752
1752
1753
1753
/**
1754
- * @param {number } id positive-numbered generic index (the AST uses negative-numbered ones)
1754
+ * @param {number } id non-negative generic index
1755
1755
* @returns {Promise<stringdex.RoaringBitmap> }
1756
1756
*/
1757
1757
async getGenericInvertedIndex ( id ) {
1758
1758
const gii = this . database . getData ( "generic_inverted_index" ) ;
1759
1759
if ( ! gii ) {
1760
1760
return RoaringBitmap . empty ( ) ;
1761
1761
}
1762
- const encoded = this . utf8decoder . decode (
1763
- await gii . at ( id ) ,
1764
- ) ;
1765
- if ( encoded === "" || encoded === undefined || encoded === null ) {
1762
+ const encoded = await gii . at ( id ) ;
1763
+ if ( encoded === undefined || encoded === null || encoded . length === 0 ) {
1766
1764
return RoaringBitmap . empty ( ) ;
1767
1765
}
1768
1766
1769
- return new RoaringBitmap ( makeUint8ArrayFromBase64 ( encoded ) ) ;
1767
+ return new RoaringBitmap ( encoded ) ;
1770
1768
}
1771
1769
1772
1770
/**
You can’t perform that action at this time.
0 commit comments