public interface CompressionAlgorithm extends Identifiable
"zip" identifier
CompressionAlgorithm extends Identifiable; the value returned from
getId() will be used as the JWT
zip header value.
Custom Implementations
A custom implementation of this interface may be used when creating a JWT by calling the
JwtBuilder.compressWith(CompressionAlgorithm) method.
To ensure that parsing is possible, the parser must be aware of the implementation by adding it to the
JwtParserBuilder.zip() collection during parser construction.
Jwts.ZIP#DEF,
Jwts.ZIP#GZIP,
JSON Web Encryption Compression Algorithms Registry| Modifier and Type | Method and Description |
|---|---|
OutputStream |
compress(OutputStream out)
Wraps the specified
OutputStream to ensure any stream bytes are compressed as they are written. |
InputStream |
decompress(InputStream in)
Wraps the specified
InputStream to ensure any stream bytes are decompressed as they are read. |
getIdOutputStream compress(OutputStream out)
OutputStream to ensure any stream bytes are compressed as they are written.out - the stream to wrap for compressionInputStream decompress(InputStream in)
InputStream to ensure any stream bytes are decompressed as they are read.in - the stream to wrap for decompressionCopyright © 2014–2024 jsonwebtoken.io. All rights reserved.