diff --git a/src/kit/CMakeLists.txt b/src/kit/CMakeLists.txt index 66e8cf73988ab25db7544b9a52215d2279630c63..be36116f270b885331b41efda8581601a1fafeb2 100644 --- a/src/kit/CMakeLists.txt +++ b/src/kit/CMakeLists.txt @@ -4,3 +4,4 @@ PROJECT(TDengine) ADD_SUBDIRECTORY(shell) ADD_SUBDIRECTORY(taosdemo) ADD_SUBDIRECTORY(taosdump) +ADD_SUBDIRECTORY(taospack) diff --git a/src/kit/taospack/taospack.c b/src/kit/taospack/taospack.c index 1160a7cb390745b087726654e796a0a71e96dc22..ddc173c5d12744a6f37fb053b59eef92f1db43a4 100644 --- a/src/kit/taospack/taospack.c +++ b/src/kit/taospack/taospack.c @@ -21,6 +21,7 @@ #include "os.h" #include "tscompression.h" +#include "tdataformat.h" #define FT_CNT 8 @@ -188,7 +189,19 @@ int memTest(); // main // int main(int argc, char *argv[]) { - printf("welcome to use taospack tools v1.1. \n"); + printf("welcome to use taospack tools v1.1. sizeof(STColumn) = %lu\n", sizeof(STColumn)); + + FILE* fp = fopen("./a.out", "w+"); + STColumn* pcol = malloc(sizeof(STColumn)); + pcol->type = 1; + pcol->colId = 2; + pcol->bytes = 3; + pcol->offset = 4; + fwrite(pcol, 1, sizeof(STColumn), fp); + fwrite("aaa", 1, 3, fp); + fclose(fp); + printf(" write a.out ok.\n"); + return 0; if(argc == 3){ char algo = 0;