Skip to content

Commit 1b048d5

Browse files
authored
Add KDB compression (#72)
* Add function kdbzip using .cmp.compression; Also added a functionality which list all compressed files in a table * Minor changes * Minor Changes after Thomas' comments * Change after Jonny's comment * Minor Change
1 parent a2c5556 commit 1b048d5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

code/processes/housekeeping.q

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,18 @@ wrapper:{[DICT]
5858
$[not DICT[`function] in key `.;.lg.e[`housekeeping;"Could not find function: ",string DICT[`function]];
5959
(value DICT[`function]) each (find[.rmvr.removeenvvar [DICT[`path]];DICT[`match];DICT[`age];DICT[`agemin]] except find[.rmvr.removeenvvar [DICT[`path]];DICT[`exclude];DICT[`age];DICT[`agemin]])]}
6060

61-
//FUNCTIONS FOR LINUX
6261

62+
63+
//compress by calling .cmp.compress function defined using -19!
64+
kdbzip:{[FILE]
65+
@[{.lg.o[`housekeeping;"compressing ",x]; .cmp.compress[filehandles;2;17;4;hcount filehandles:hsym `$x]};
66+
FILE;
67+
{.lg.e[`housekeeping;"Failed to compress ",x," : ", y]}[FILE]]
68+
}
69+
70+
71+
72+
//FUNCTIONS FOR LINUX
6373
\d .unix
6474

6575
//-locates files with path, matching string and age

0 commit comments

Comments
 (0)