Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCOL-987 Refactor compression interface. #1837

Closed
wants to merge 1 commit into from

Conversation

denis0x0D
Copy link
Contributor

This patch changes compression interface. Motivation is to be able to add
new compression methods.

  • All methods which use static data and do not modify any internal data - become static,
    so we can use them without creation of the specific object. This is possible, because
    the header specification has not been modified. We still use 2 sections in header, first
    one with file meta data, the second one with pointers for compressed chunks.

  • Methods compress, uncompress, maxCompressedSize, getUncompressedSize - become
    pure virtual, so we can override them for the other compression algos.

  • Adds method getChunkMagicNumber, so we can verify chunk magic number
    for each compression algo.

  • Renames "s/IDBCompressInterface/CompressInterface/g" according to requirement.

This patch changes compression interface. Motivation is to be able to add
new compression methods.

* All methods which use static data and do not modify any internal data - become `static`,
  so we can use them without creation of the specific object. This is possible, because
  the header specification has not been modified. We still use 2 sections in header, first
  one with file meta data, the second one with pointers for compressed chunks.
* Methods `compress`, `uncompress`, `maxCompressedSize`, `getUncompressedSize` - become
  pure virtual, so we can override them for the other compression algos.
* Adds method `getChunkMagicNumber`, so we can verify chunk magic number
  for each compression algo.
* Renames "s/IDBCompressInterface/CompressInterface/g" according to requirement.
@denis0x0D
Copy link
Contributor Author

Moved to: #1842

@denis0x0D denis0x0D closed this Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants