Module org.elasticsearch.xcore
Class InferenceToXContentCompressor
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.InferenceToXContentCompressor
Collection of helper methods. Similar to CompressedXContent, but this utilizes GZIP for parity with the native compression
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ToXContentObject>
BytesReferencedeflate(T objectToCompress) static <T> Tinflate(BytesReference compressedBytes, CheckedFunction<XContentParser, T, IOException> parserFunction, NamedXContentRegistry xContentRegistry) static <T> TinflateUnsafe(BytesReference compressedBytes, CheckedFunction<XContentParser, T, IOException> parserFunction, NamedXContentRegistry xContentRegistry)
-
Method Details
-
deflate
public static <T extends ToXContentObject> BytesReference deflate(T objectToCompress) throws IOException - Throws:
IOException
-
inflateUnsafe
public static <T> T inflateUnsafe(BytesReference compressedBytes, CheckedFunction<XContentParser, T, throws IOExceptionIOException> parserFunction, NamedXContentRegistry xContentRegistry) - Throws:
IOException
-
inflate
public static <T> T inflate(BytesReference compressedBytes, CheckedFunction<XContentParser, T, throws IOExceptionIOException> parserFunction, NamedXContentRegistry xContentRegistry) - Throws:
IOException
-