Package io.github.mahmoudimus.quic.tls
Interface CertificateDecompressor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Decompresses a server's certificate chain (RFC 8879) with one of the algorithms a client offers
in
compress_certificate. zlib is built in (ZLIB); Brotli and zstd come from the
caller, which has decoders for them.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CertificateDecompressorzlib (RFC 1950) only, with the JDK'sInflater. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decompress(int algorithm, byte[] data, int length) The chain's Certificate message body, decompressed.default CertificateDecompressoror(CertificateDecompressor other) This decompressor, falling back tootherfor algorithms it does not have.
-
Field Details
-
ZLIB
zlib (RFC 1950) only, with the JDK'sInflater.
-
-
Method Details
-
decompress
The chain's Certificate message body, decompressed.- Parameters:
algorithm- theCertificateCompressionAlgorithmthe server useddata- the compressed byteslength- theuncompressed_lengththe server announced, at most 2^24- Returns:
- exactly
lengthbytes, or null if this decompressor has no such algorithm - Throws:
IOException- if the data does not decompress tolengthbytes
-
or
This decompressor, falling back tootherfor algorithms it does not have.
-