public interface CompressionCodec
DeflateCompressionCodec
,
GzipCompressionCodec
限定符和类型 | 方法和说明 |
---|---|
byte[] |
compress(byte[] payload)
Compresses the specified byte array according to the compression
algorithm . |
byte[] |
decompress(byte[] compressed)
Decompresses the specified compressed byte array according to the compression
algorithm . |
java.lang.String |
getAlgorithmName()
The algorithm name to use as the JWT's
calg header value. |
java.lang.String getAlgorithmName()
calg
header value.calg
header value.byte[] compress(byte[] payload) throws CompressionException
algorithm
.payload
- bytes to compressCompressionException
- if the specified byte array cannot be compressed according to the compression
algorithm
.byte[] decompress(byte[] compressed) throws CompressionException
algorithm
. The specified byte array must already be in compressed form
according to the algorithm
.compressed
- compressed bytesCompressionException
- if the specified byte array cannot be decompressed according to the compression
algorithm
.