Skip to content

Commit b109bb1

Browse files
DOC-1078 a dictionary can also be assigned to .z.zd
1 parent c1e0bb1 commit b109bb1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docs/ref/dotz.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,7 @@ q).z.z
11561156

11571157
```syntax
11581158
.z.zd:(lbs;alg;lvl)
1159+
.z.zd:dic
11591160
```
11601161

11611162
Integers `lbs`, `alg`, and `lvl` are [compression parameters](../kb/file-compression.md#compression-parameters) and/or [encryption parameters](../kb/dare.md#encryption).
@@ -1167,6 +1168,16 @@ q).z.zd:17 2 6 / set zip defaults
11671168
q)\x .z.zd / clear zip defaults
11681169
```
11691170

1171+
You can also assign a dictionary to `.z.zd`. The keys of the dictionary are either column names or the null symbol `` ` ``. The value of each entry is an integer vector: `lbs`, `alg`, and `lvl`.
1172+
1173+
```q
1174+
q)show dic:``a`b!(17 5 3;17 2 6;17 2 6)
1175+
| 17 5 3
1176+
a| 17 2 6
1177+
b| 17 2 6
1178+
q).z.zd:dic
1179+
```
1180+
11701181
:fontawesome-solid-hand-point-right:
11711182
[`-21!x`](../basics/internal.md#-21x-compressionencryption-stats) (compression/encryption stats), [`set`](get.md#set) (per file/dir compression)
11721183

docs/ref/get.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ q)m1:1000000
206206
q)t:([]a:m1?10;b:m1?10;c:m1?10;d:m1?10)
207207
208208
q)/specify compression for cols a, b and defaults for others
209-
q)show dic:``a`b!(17 2 9;17 2 6;17 2 6)
210-
| 17 2 9
209+
q)show dic:``a`b!(17 5 3;17 2 6;17 2 6)
210+
| 17 5 3
211211
a| 17 2 6
212212
b| 17 2 6
213213
q)(`:ztbl/;dic) set t / splay table compressed

0 commit comments

Comments
 (0)