public class ArrayOfStringsSerDe extends ArrayOfItemsSerDe<String>
ArrayOfUtf16StringsSerDe
. In an extreme case when all strings are in ASCII,
this method is 2 times more compact, but it takes more time to encode and decode
by a factor of 1.5 to 2.Constructor and Description |
---|
ArrayOfStringsSerDe() |
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.