public class ArrayOfUtf16StringsSerDe extends ArrayOfItemsSerDe<String>
ArrayOfStringsSerDe
.
In an extreme case when all strings are in ASCII, the size is doubled. However it takes
less time to serialize and deserialize by a factor of 1.5 to 2.Constructor and Description |
---|
ArrayOfUtf16StringsSerDe() |
Modifier and Type | Method and Description |
---|---|
String[] |
deserializeFromMemory(org.apache.datasketches.memory.Memory mem,
int numItems)
Deserialize an array of items from a given Memory object.
|
byte[] |
serializeToByteArray(String[] items)
Serialize an array of items to byte array.
|
public byte[] serializeToByteArray(String[] items)
ArrayOfItemsSerDe
serializeToByteArray
in class ArrayOfItemsSerDe<String>
items
- array of items to be serializedpublic String[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem, int numItems)
ArrayOfItemsSerDe
deserializeFromMemory
in class ArrayOfItemsSerDe<String>
mem
- Memory containing a serialized array of itemsnumItems
- number of items in the serialized arrayCopyright © 2015–2021 The Apache Software Foundation. All rights reserved.