mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Retain source data for prepared dictionary.
Unlike pure-java prepared dictionary, in native prepared dictionaries source data is not copied, but referenced. Likely because of copy-paste, `raw_data` field was not populated. PiperOrigin-RevId: 944339020
This commit is contained in:
committed by
Copybara-Service
parent
362f43adef
commit
4e6d8fbfa3
@@ -35,6 +35,8 @@ class EncoderJNI {
|
|||||||
|
|
||||||
private PreparedDictionaryImpl(ByteBuffer data, ByteBuffer rawData) {
|
private PreparedDictionaryImpl(ByteBuffer data, ByteBuffer rawData) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
// Retain a reference to the raw data to prevent it from being garbage collected.
|
||||||
|
this.rawData = rawData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user