Class: ActiveSupport::Cache::ZstdCompressor::WithZlibFallback
- Inherits:
-
ActiveSupport::Cache::ZstdCompressor
- Object
- ActiveSupport::Cache::ZstdCompressor
- ActiveSupport::Cache::ZstdCompressor::WithZlibFallback
- Defined in:
- lib/active_support/cache/zstd_compressor/with_zlib_fallback.rb
Constant Summary collapse
- ZSTD_MAGIC_NUMBER =
ZStandard Magic Number (0xFD2FB528) in little-endian format. See: datatracker.ietf.org/doc/html/rfc8878#name-zstandard-frames
[0xFD2FB528].pack("L<")
Constants inherited from ActiveSupport::Cache::ZstdCompressor
Instance Attribute Summary
Attributes inherited from ActiveSupport::Cache::ZstdCompressor
Instance Method Summary collapse
Methods inherited from ActiveSupport::Cache::ZstdCompressor
Constructor Details
This class inherits a constructor from ActiveSupport::Cache::ZstdCompressor
Instance Method Details
#inflate(deflated) ⇒ Object
13 14 15 16 17 |
# File 'lib/active_support/cache/zstd_compressor/with_zlib_fallback.rb', line 13 def inflate(deflated) return super if deflated.b.start_with?(ZSTD_MAGIC_NUMBER) Zlib.inflate(deflated) end |