Skip to content

Remove obsolete compression code and some .h->.cc movement#14325

Closed
pdillinger wants to merge 1 commit intofacebook:mainfrom
pdillinger:old_compress_remove
Closed

Remove obsolete compression code and some .h->.cc movement#14325
pdillinger wants to merge 1 commit intofacebook:mainfrom
pdillinger:old_compress_remove

Conversation

@pdillinger
Copy link
Copy Markdown
Contributor

Summary: In follow-up to #14315

Remove obsolete code replaced by new Compressor/Decompressor interface:

  • OLD_CompressData and OLD_UncompressData
  • Individual compression/decompression functions (Snappy_, Zlib_, BZip2_, LZ4_, LZ4HC_, XPRESS_, ZSTD_Compress, ZSTD_Uncompress)
  • CompressionInfo and UncompressionInfo classes
  • UncompressionDict class
  • compression::PutDecompressedSizeInfo and GetDecompressedSizeInfo

The only small refactoring in this change that is not pure code removal or movement is in blob_file_builder_test.cc.

Move some function implementations etc. from compression.h to compression.cc:

  • CompressionTypeToString, CompressionTypeFromString, CompressionOptionsToString
  • ZSTD_TrainDictionary (both overloads), ZSTD_FinalizeDictionary
  • DecompressorDict::Populate
  • Most compression library includes

Also cleaned up other includes of compression.h, which caused some other files to need new includes.

Test Plan: existing tests

Summary: In follow-up to facebook#14315

Remove obsolete code replaced by new Compressor/Decompressor interface:
* CompressionInfo and UncompressionInfo classes
* UncompressionDict class
* Individual compression/decompression functions (Snappy_*, Zlib_*, BZip2_*,
  LZ4_*, LZ4HC_*, XPRESS_*, ZSTD_Compress, ZSTD_Uncompress)
* OLD_CompressData and OLD_UncompressData
* compression::PutDecompressedSizeInfo and GetDecompressedSizeInfo

The only small refactoring in this change that is not pure code removal
or movement is in blob_file_builder_test.cc.

Move some function implementations etc. from compression.h to compression.cc:
* CompressionTypeToString, CompressionTypeFromString, CompressionOptionsToString
* ZSTD_TrainDictionary (both overloads), ZSTD_FinalizeDictionary
* DecompressorDict::Populate
* Most compression library includes

Also cleaned up other includes of compression.h, which caused some other
files to need new includes.

Test Plan: existing tests
@pdillinger pdillinger requested a review from hx235 February 12, 2026 16:53
@meta-cla meta-cla Bot added the CLA Signed label Feb 12, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Feb 12, 2026

@pdillinger has imported this pull request. If you are a Meta employee, you can view this in D93120580.

Comment thread db/version_edit.h
#include "rocksdb/advanced_options.h"
#include "table/table_reader.h"
#include "table/unique_id_impl.h"
#include "test_util/sync_point.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new behavior of make format???

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar for env/env.cc and options/cf_options.cc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just fixing fallout of tidying up includes of compression.h. "Also cleaned up other includes of compression.h, which caused some other files to need new includes."

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Feb 13, 2026

@pdillinger merged this pull request in 672389f.

doxtop pushed a commit to flyingw/rocksdb that referenced this pull request Apr 7, 2026
…14325)

Summary:
In follow-up to facebook#14315

Remove obsolete code replaced by new Compressor/Decompressor interface:
* OLD_CompressData and OLD_UncompressData
* Individual compression/decompression functions (Snappy_*, Zlib_*, BZip2_*, LZ4_*, LZ4HC_*, XPRESS_*, ZSTD_Compress, ZSTD_Uncompress)
* CompressionInfo and UncompressionInfo classes
* UncompressionDict class
* compression::PutDecompressedSizeInfo and GetDecompressedSizeInfo

The only small refactoring in this change that is not pure code removal or movement is in blob_file_builder_test.cc.

Move some function implementations etc. from compression.h to compression.cc:
* CompressionTypeToString, CompressionTypeFromString, CompressionOptionsToString
* ZSTD_TrainDictionary (both overloads), ZSTD_FinalizeDictionary
* DecompressorDict::Populate
* Most compression library includes

Also cleaned up other includes of compression.h, which caused some other files to need new includes.

Pull Request resolved: facebook#14325

Test Plan: existing tests

Reviewed By: hx235

Differential Revision: D93120580

Pulled By: pdillinger

fbshipit-source-id: ab5c50db7379c0387a8c0e379642c9ea2799eae5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants