From 1f3e3bbe6290af4b7d7731da1c9800430fa552d7 Mon Sep 17 00:00:00 2001 From: chaokunyang Date: Wed, 4 Sep 2024 07:39:42 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'docs/guide/'?= =?UTF-8?q?=20with=20remote=20'docs/guide/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide/java_serialization_guide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guide/java_serialization_guide.md b/docs/guide/java_serialization_guide.md index 3d8522b54..6d4a0d153 100644 --- a/docs/guide/java_serialization_guide.md +++ b/docs/guide/java_serialization_guide.md @@ -108,8 +108,8 @@ public class Example { | `registerGuavaTypes` | Whether to pre-register Guava types such as `RegularImmutableMap`/`RegularImmutableList`. These types are not public API, but seem pretty stable. | `true` | | `requireClassRegistration` | Disabling may allow unknown classes to be deserialized, potentially causing security risks. | `true` | | `suppressClassRegistrationWarnings` | Whether to suppress class registration warnings. The warnings can be used for security audit, but may be annoying, this suppression will be enabled by default. | `true` | -| `metaShareEnabled` | Enables or disables meta share mode. | `false` | -| `scopedMetaShareEnabled` | Scoped meta share focuses on a single serialization process. Metadata created or identified during this process is exclusive to it and is not shared with by other serializations. | `false` | +| `metaShareEnabled` | Enables or disables meta share mode. | `true` if `CompatibleMode.Compatible` is set, otherwise false. | +| `scopedMetaShareEnabled` | Scoped meta share focuses on a single serialization process. Metadata created or identified during this process is exclusive to it and is not shared with by other serializations. | `true` if `CompatibleMode.Compatible` is set, otherwise false. | | `metaCompressor` | Set a compressor for meta compression. Note that the passed MetaCompressor should be thread-safe. By default, a `Deflater` based compressor `DeflaterMetaCompressor` will be used. Users can pass other compressor such as `zstd` for better compression rate. | `DeflaterMetaCompressor` | | `deserializeNonexistentClass` | Enables or disables deserialization/skipping of data for non-existent classes. | `true` if `CompatibleMode.Compatible` is set, otherwise false. | | `codeGenEnabled` | Disabling may result in faster initial serialization but slower subsequent serializations. | `true` | @@ -179,13 +179,13 @@ bit is set, then next byte will be read util first bit of next byte is unset. For long compression, fury support two encoding: - Fury SLI(Small long as int) Encoding (**used by default**): - - If long is in [-1073741824, 1073741823], encode as 4 bytes int: `| little-endian: ((int) value) << 1 |` + - If long is in `[-1073741824, 1073741823]`, encode as 4 bytes int: `| little-endian: ((int) value) << 1 |` - Otherwise write as 9 bytes: `| 0b1 | little-endian 8bytes long |` - Fury PVL(Progressive Variable-length Long) Encoding: - First bit in every byte indicate whether has next byte. if first bit is set, then next byte will be read util - first bit of next byte is unset. + first bit of next byte is unset. - Negative number will be converted to positive number by `(v << 1) ^ (v >> 63)` to reduce cost of small negative - numbers. + numbers. If a number are `long` type, it can't be represented by smaller bytes mostly, the compression won't get good enough result,