Hello everyone, we are currently introducing the missing encoding and 
compression algorithms in TsFile CPP. How should we integrate such dependencies?



After looking into some C++ projects, I have summarized the following possible 
approaches:

1. Directly include the entire source code or compressed package of the 
third-party dependency in the dependencies folder. For example, Apache ORC adds 
dependencies using compressed packages. [1]  Apache BRPC integrates the Snappy 
dependency by adding its source code directly. [2] 

2. Use scripts to download dependencies. [3]

3. Create Git submodules in the dependencies folder. [4]




In the approaches mentioned above, the first approach does not require 
additional downloads; the project can be used directly after cloning. However, 
it will increase the overall size of the project. Approaches 2 and 3 require 
extra download steps and depend on the availability and reliability of the 
download links, but they help keep the project lightweight.




Considering the scenarios of offline compilation and the need for 
multi-platform support, I think it might be better to include third-party 
source code or compressed packages. For simpler dependencies, the source files 
can be directly included, while for larger third-party packages, compressed 
files can be used. These compressed packages can be extracted either during the 
build process or interactively.





What do you think?


Colin.


[1]:  https://github.com/apache/orc/tree/main/c%2B%2B/libs/libhdfspp
[2]: https://github.com/apache/brpc/tree/master/src/butil/third_party/snappy
[3]: https://github.com/apache/arrow/tree/main/cpp/thirdparty
[4]: 
https://github.com/apache/flink/tree/2c830898640fe65016763c747c05110bd79b8894/docs/themes



Reply via email to