From 93154cfbd836dd405295d5733654df9600582e3f Mon Sep 17 00:00:00 2001 From: tickduan <417921451@qq.com> Date: Tue, 22 Jun 2021 14:10:45 +0800 Subject: [PATCH] add taospack --- src/kit/CMakeLists.txt | 1 + src/kit/taospack/taospack.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/kit/CMakeLists.txt b/src/kit/CMakeLists.txt index 66e8cf7398..be36116f27 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 1160a7cb39..ddc173c5d1 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; -- GitLab