-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathhbziparc.html
567 lines (531 loc) · 53.1 KB
/
hbziparc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="referrer" content="origin">
<meta name="viewport" content="initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content">
<meta name="generator" content="hbdoc">
<meta name="keywords" content="Harbour, Clipper, xBase, database, Free Software, GPL, compiler, cross-platform, 32-bit, 64-bit">
<title>Harbour Reference Guide · hbziparc lib</title>
<style>
/**
* Minified by jsDelivr using clean-css v4.2.1.
* Original file: /gh/PrismJS/prism@1.17.1/themes/prism-okaidia.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
/*# sourceMappingURL=/sm/40fbac8c090a0ea2949bef662c4dc8f61e9fdf4136e4615ec312d47b6c8d4578.map */
</style>
<link rel="stylesheet" href="hbdoc.css">
<body>
<header>
<svg viewBox="0 0 2260 2260" xmlns="http://www.w3.org/2000/svg">
<path d="m900 1908c137.17-53.265 443.4-77.006 600-52.437-27.114-474.75-34.113-758.18-7.68-1116.3 2.056-27.195 4.283-54.9 6.68-83.245-34.633 68.628-579.45 1206.4-599 1252z"/>
<path d="m1503 297c-123.84 327.12-161.3 844.46-213.46 1389.5-169.5-13.113-449.01 19.795-659.3 108.82 13.528-23.75 771.23-1330.1 872.77-1498.3z"/>
<path d="m1172 1270c-224.3-65.046-473.09 64.996-694 204 153.35-235.43 613.25-936.89 1011-1474-301.51 419.86-317.18 1087.9-317 1270z"/>
<path d="m620.8 2258.7c0.662-1.037 1.36-2.165 2.068-3.191 36.736-55.29 105.69-101.18 205.1-96.72 193.8 8.619 357.24 25.577 652.18 7.207-290.1-9.342-643.35-48.142-1069.1-124.55 105.83 77.98 193.83 195.4 209.76 217.25"/>
<path d="m2259.2 2007.9c-351.83 85.376-1111.3 54.312-2014.2-105.24 59.534 32.024 105.24 68.44 160.57 113.87 884.55 158.71 1465.7 153.54 1808.7 60.37 31.307-22.43 35.385-37.956 44.934-69.006"/>
<path d="m2250.8 1985.6c-316.53 76.867-976 46.6-1793.5-72.332-79.588-11.605-308.23-46.57-445.63-69.063-7.464-15.506-11.282-40.462-11.282-70.79 509.45 68.675 1799.6 275.42 2244 168.26 2.015 12.02 7.115 18.487 6.527 43.929"/>
</svg>
<div>
<div><a href="index.html">Harbour Reference Guide</a></div>
<div>
<nav class="menu">
<nav class="dropdown">
<span class="dropbtn" onclick="">hbziparc lib</span>
<nav class="dropdown-content">
<a href="harbour.html">Harbour core</a>
<hr>
<a href="clc53.html">Clipper 5.3</a>
<a href="clct3.html">Clipper Tools 3</a>
<hr>
<a href="gtwvw.html">gtwvw</a>
<a href="hbct.html">hbct</a>
<a href="hbcups.html">hbcups</a>
<a href="hbgd.html">hbgd</a>
<a href="hbgt.html">hbgt</a>
<a href="hbmisc.html">hbmisc</a>
<a href="hbnf.html">hbnf</a>
<a href="hbxpp.html">hbxpp</a>
<a href="hbziparc.html">hbziparc</a>
<a href="rddads.html">rddads</a>
</nav>
</nav>
<nav class="dropdown lang">
<span class="dropbtn lang">EN</span><nav class="dropdown-content lang">
<a href="hbziparc.html">EN</a>
<a href="pt-br/index.html">pt-BR</a>
</nav>
</nav>
</nav>
</div>
</div>
</header>
<aside>
<a href="#hb_getzipcomment" title="hb_GetZipComment()"><code>hb_GetZipComment()</code></a>
<a href="#hb_setbuffer" title="hb_SetBuffer()"><code>hb_SetBuffer()</code></a>
<a href="#hb_setdiskzip" title="hb_SetDiskZip()"><code>hb_SetDiskZip()</code></a>
<a href="#hb_setzipcomment" title="hb_SetZipComment()"><code>hb_SetZipComment()</code></a>
<a href="#hb_unzipfile" title="hb_UnzipFile()"><code>hb_UnzipFile()</code></a>
<a href="#hb_zipdeletefiles" title="hb_ZipDeleteFiles()"><code>hb_ZipDeleteFiles()</code></a>
<a href="#hb_zipfile" title="hb_ZipFile()"><code>hb_ZipFile()</code></a>
<a href="#hb_zipfilebypkspan" title="hb_ZipFileByPKSpan()"><code>hb_ZipFileByPKSpan()</code></a>
<a href="#hb_zipfilebytdspan" title="hb_ZipFileByTDSpan()"><code>hb_ZipFileByTDSpan()</code></a>
<a href="#hb_ziptestpk" title="hb_ZipTestPK()"><code>hb_ZipTestPK()</code></a>
</aside>
<main>
<section>
<h4><a href="#hb_getzipcomment" class="d-id" id="hb_getzipcomment" title="∞"><code>hb_GetZipComment()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L76" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_GetZipComment">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_GetZipComment">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Return the comment of an zip file</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_GetZipComment( <szFile> ) → <szComment></code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>szFile</code> File to get the comment from</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>szComment</code> The comment that was stored in <code>szFile</code></div>
<div class="d-d">Description</div>
<div class="d-it">This function receives a valid zip file name as parameter, and returns the global comment stored within.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? "The comment in test.zip is:", hb_GetZipComment( "test.zip" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_setbuffer" class="d-id" id="hb_setbuffer" title="∞"><code>hb_SetBuffer()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L215" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_SetBuffer">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_SetBuffer">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_SetBuffer( [<nWriteBuffer>], [<nExtractBuffer>], [<nReadBuffer>] ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>nWriteBuffer</code> The size of the write buffer.</div>
<div><code>nExtractBuffer</code> The size of the extract buffer.</div>
<div><code>nReadBuffer</code> The size of the read buffer.</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code> This function always returns <code>NIL</code>.</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function set the size of the internal buffers for write/extract/read operation.</div>
<div><p>If the size of the buffer is smaller then the default, the function will automatically use the default values, which are 65535/16384/32768 respectively.</div>
<div><p>This function be called before any of the compression/decompression functions.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">hb_SetBuffer( 100000, 115214, 65242 )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_setdiskzip" class="d-id" id="hb_setdiskzip" title="∞"><code>hb_SetDiskZip()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L197" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_SetDiskZip">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_SetDiskZip">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Set a codeblock for disk changes</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_SetDiskZip( <bBlock> ) → .T.</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>bBlock</code> a codeblock that contains an function that will be performed when the need of changing disk are need.</div>
<div class="d-d">Returns</div>
<div class="d-it">It always returns True</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function will set a codeblock that will be evaluated every time that an change-disk event is necessary. <code>bBlock</code> receives <code>nDisk</code> as a codeblock param that corresponds to the diskette number to be processed.</div>
<div><p>Set this function before opening archives that are in removable media. This block will be released, when the caller finish it job.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">hb_SetDiskZip( {| nDisk | Alert( "Please insert disk no " + hb_ntos( nDisk ) ) } )
</code></pre></div></section>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_setzipcomment" class="d-id" id="hb_setzipcomment" title="∞"><code>hb_SetZipComment()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L68" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_SetZipComment">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_SetZipComment">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Set an Zip archive Comment</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_SetZipComment( <cComment> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cComment</code> Comment to add to the zip archive</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code> this function always return <code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">This function stored an global comment to an zip archive. It should be called before any of the compression functions.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? hb_SetZipComment( "This is an Test" )
? hb_ZipFile( "test.zip", { "test.xml", "test.ini" } )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_unzipfile" class="d-id" id="hb_unzipfile" title="∞"><code>hb_UnzipFile()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L389" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_UnzipFile">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_UnzipFile">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Unzip a compressed file</div>
<div class="d-d">Syntax</div>
<div class="d-sy d-sym">
<pre><code>hb_UnzipFile( <cFile>, <bBlock>, <lWithPath>, <cPassword>, <cPath>,
<cFile> | <aFile>, <pFileProgress> ) → lCompress
</code></pre>
</div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFile</code> Name of the zip file to extract</div>
<div><code>bBlock</code> Codeblock to execute while extracting</div>
<div><code>lWithPath</code> Toggle to create directory if needed</div>
<div><code>cPassword</code> Password to use to extract files</div>
<div><code>cPath</code> Path to extract the files to - mandatory</div>
<div><code>cFile</code> | <code>aFiles</code> A File or Array of files to extract - mandatory</div>
<div><code>pFileProgress</code> Codeblock for File Progress</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lCompress</code> <code>.T.</code> if all file was successfully restored, otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function restores all files contained inside the <code>cFile</code>. If the extension is omitted, .zip will be assumed. If a file already exists, it will be overwritten.</div>
<div><p>If <code>bBlock</code> is used, every time the file is opened to compress it will evaluate <code>bBlock</code>. Parameters of <code>bBlock</code> are <code>cFile</code> and <code>nPos</code>.</div>
<div><p>The <code>cPath</code> is a mandatory parameter. Set to <code>./</code> to extract to the current directory.</div>
<div><p>If <code>cFile</code> or <code>aFiles</code> are not provided, no files will be extracted! Make sure you provide the file or files you want extracted.</div>
<div><p>If <code>pFileProgress</code> is used, a codeblock is evaluated, showing the total of that file has being processed. The codeblock must be defined as: <code>{| nPos, nTotal | GaugeUpdate( aGauge1, nPos / nTotal ) }</code></div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aExtract := hb_GetFilesInZip( "test.zip" ) // extract all files in zip
IF hb_UnzipFile( "test.zip",,,, hb_DirSepToOS( "./" ), aExtract )
? "File was successfully extracted"
ENDIF
aExtract := hb_GetFilesInZip( "test2.zip" ) // extract all files in zip
IF hb_UnzipFile( "test2.zip", {| cFile | QOut( cFile ) },,, hb_DirSepToOS( "./" ), aExtract )
? "File was successfully extracted"
ENDIF
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_zipdeletefiles" class="d-id" id="hb_zipdeletefiles" title="∞"><code>hb_ZipDeleteFiles()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L488" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_ZipDeleteFiles">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_ZipDeleteFiles">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Delete files from an zip archive</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_ZipDeleteFiles( <cFile>, <cFiletoDelete> | <aFiles> | <nFilePos> ) → lDeleted</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFile</code> The name of the zip files from where the files will be deleted</div>
<div><code>cFiletoDelete</code> An File to be removed</div>
<div><em>or</em></div>
<div><code>aFiles</code> An Array of Files to be removed</div>
<div><em>or</em></div>
<div><code>nFilePos</code> The Position of the file to be removed</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lDeleted</code> If the files are deleted, it will return <code>.T.</code>; otherwise it will return <code>.F.</code> in the following cases: Spanned Archives; the file(s) could not be found in the zip file.</div>
<div class="d-d">Description</div>
<div class="d-it">This function removes files from an Zip archive.</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">? "has the file zipnew.i been deleted:", iif( hb_ZipDeleteFiles( "test23.zip", "zipnew.i" ), "Yes", "No" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_zipfile" class="d-id" id="hb_zipfile" title="∞"><code>hb_ZipFile()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L237" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_ZipFile">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_ZipFile">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Create a zip file</div>
<div class="d-d">Syntax</div>
<div class="d-sy d-sym">
<pre><code>hb_ZipFile( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,
<bBlock>, <lOverWrite>, <cPassword>, <lWithPath>, <lWithDrive>,
<pFileProgress> ) → lCompress
</code></pre>
</div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFile</code> Name of the zip file to create</div>
<div><code>cFileToCompress</code> Name of a file to Compress, Drive and/or path can be used</div>
<div><em>or</em></div>
<div><code>aFiles</code> An array containing files to compress, Drive and/or path can be used</div>
<div><code>nLevel</code> Compression level ranging from 0 to 9</div>
<div><code>bBlock</code> Codeblock to execute while compressing</div>
<div><code>lOverWrite</code> Toggle to overwrite the file if exists</div>
<div><code>cPassword</code> Password to encrypt the files</div>
<div><code>lWithPath</code> Toggle to store the path or not</div>
<div><code>lWithDrive</code> Toggle to store the Drive letter and path or not</div>
<div><code>pFileProgress</code> Codeblock for File Progress</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lCompress</code> <code>.T.</code> if file was create, otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function creates a zip file named <code>cFile</code>. If the extension is omitted, .zip will be assumed. If the second parameter is a character string, this file will be added to the zip file. If the second parameter is an array, all file names contained in <code>aFiles</code> will be compressed.</div>
<div><p>If <code>nLevel</code> is used, it determines the compression type where 0 means no compression and 9 means best compression.</div>
<div><p>If <code>bBlock</code> is used, every time the file is opened to compress it will evaluate <code>bBlock</code>. Parameters of <code>bBlock</code> are <code>cFile</code> and <code>nPos</code>.</div>
<div><p>If <code>lOverWrite</code> is used, it toggles to overwrite or not the existing file. Default is to overwrite the file, otherwise if <code>lOverWrite</code> is false the new files are added to the <code>cFile</code>.</div>
<div><p>If <code>cPassword</code> is used, all files that are added to the archive are encrypted with the password.</div>
<div><p>If <code>lWithPath</code> is used, it tells the path should also be stored with the file name. Default is false.</div>
<div><p>If <code>lWithDrive</code> is used, it tells that the Drive and path should also be stored with the file name. Default is false.</div>
<div><p>If <code>pFileProgress</code> is used, a codeblock is evaluated, showing the total of that file has being processed. The codeblock must be defined as: <code>{| nPos, nTotal | GaugeUpdate( aGauge1, nPos / nTotal ) }</code></div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aFiles, nLen, aGauge
IF hb_ZipFile( "test.zip", "test.prg" )
? "File was successfully created"
ENDIF
IF hb_ZipFile( "test1.zip", { "test.prg", "test.hbp" } )
? "File was successfully created"
ENDIF
IF hb_ZipFile( "test2.zip", { "test.prg", "test.hbp" }, 9, {| cFile, nPos | QOut( cFile ) } )
? "File was successfully created"
ENDIF
aFiles := { "test.prg", "test.hbp" }
nLen := Len( aFiles )
hb_ZipFile( "test33.zip", aFiles, 9,,, "hello" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_zipfilebypkspan" class="d-id" id="hb_zipfilebypkspan" title="∞"><code>hb_ZipFileByPKSpan()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L234" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_ZipFileByPKSpan">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_ZipFileByPKSpan">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Create a zip file on removable media</div>
<div class="d-d">Syntax</div>
<div class="d-sy d-sym">
<pre><code>hb_ZipFileByPKSpan( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,
<bBlock>, <lOverWrite>, <cPassword>, <lWithPath>, <lWithDrive>,
<pFileProgress> ) → lCompress
</code></pre>
</div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFile</code> Name of the zip file</div>
<div><code>cFileToCompress</code> Name of a file to Compress, Drive and/or path can be used</div>
<div><em>or</em></div>
<div><code>aFiles</code> An array containing files to compress, Drive and/or path can be used</div>
<div><code>nLevel</code> Compression level ranging from 0 to 9</div>
<div><code>bBlock</code> Codeblock to execute while compressing</div>
<div><code>lOverWrite</code> Toggle to overwrite the file if exists</div>
<div><code>cPassword</code> Password to encrypt the files</div>
<div><code>lWithPath</code> Toggle to store the path or not</div>
<div><code>lWithDrive</code> Toggle to store the Drive letter and path or not</div>
<div><code>pFileProgress</code> Codeblock for File Progress</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lCompress</code> <code>.T.</code> if file was create, otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function creates a zip file named <code>cFile</code>. If the extension is omitted, .zip will be assumed. If the second parameter is a character string, this file will be added to the zip file. If the second parameter is an array, all file names contained in <code>aFiles</code> will be compressed. Also, the use of this function is for creating backup in removable media like an floppy drive/zip drive.</div>
<div><p>If <code>nLevel</code> is used, it determines the compression type where 0 means no compression and 9 means best compression.</div>
<div><p>If <code>bBlock</code> is used, every time the file is opened to compress it will evaluate <code>bBlock</code>. Parameters of <code>bBlock</code> are <code>cFile</code> and <code>nPos</code>.</div>
<div><p>If <code>lOverWrite</code> is used, it toggles to overwrite or not the existing file. Default is to overwrite the file, otherwise if <code>lOverWrite</code> is false the new files are added to the <code>cFile</code>.</div>
<div><p>If <code>cPassword</code> is used, all files that are added to the archive are encrypted with the password.</div>
<div><p>If <code>lWithPath</code> is used, it tells that the path should also be stored with the file name. Default is false.</div>
<div><p>If <code>lWithDrive</code> is used, it tells that the Drive and path should also be stored with the file name. Default is false.</div>
<div><p>If <code>pFileProgress</code> is used, a codeblock is evaluated, showing the total of that file has being processed. The codeblock must be defined as: <code>{| nPos, nTotal | GaugeUpdate( aGauge1, nPos / nTotal ) }</code></div>
<div><p>Before calling this function, set a change-disk codeblock by calling the <code><a href="#hb_setdiskzip">hb_SetDiskZip()</a></code>.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aFiles, nLen, aGauge
hb_SetDiskZip( {| nDisk | Alert( "Please insert disk no " + hb_ntos( nDisk ) ) } )
IF hb_ZipFileByPKSpan( "test.zip", "test.prg" )
? "File was successfully created"
ENDIF
IF hb_ZipFileByPKSpan( "test1.zip", { "test.prg", "test.hbp" } )
? "File was successfully created"
ENDIF
IF hb_ZipFileByPKSpan( "test2.zip", { "test.prg", "test.hbp" }, 9, {| cFile, nPos | QOut( cFile ) } )
? "File was successfully created"
ENDIF
aFiles := { "test.prg", "test.hbp" }
nLen := Len( aFiles )
hb_ZipFileByPKSpan( "test33.zip", aFiles, 9,,, "hello" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_zipfilebytdspan" class="d-id" id="hb_zipfilebytdspan" title="∞"><code>hb_ZipFileByTDSpan()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L227" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_ZipFileByTDSpan">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_ZipFileByTDSpan">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Create a zip file</div>
<div class="d-d">Syntax</div>
<div class="d-sy d-sym">
<pre><code>hb_ZipFileByTDSpan( <cFile>, <cFileToCompress> | <aFiles>, <nLevel>,
<bBlock>, <lOverWrite>, <cPassword>, <iSize>, <lWithPath>, <lWithDrive>,
<pFileProgress>) → lCompress
</code></pre>
</div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>cFile</code> Name of the zip file</div>
<div><code>cFileToCompress</code> Name of a file to Compress, Drive and/or path can be used</div>
<div><em>or</em></div>
<div><code>aFiles</code> An array containing files to compress, Drive and/or path can be used</div>
<div><code>nLevel</code> Compression level ranging from 0 to 9</div>
<div><code>bBlock</code> Codeblock to execute while compressing</div>
<div><code>lOverWrite</code> Toggle to overwrite the file if exists</div>
<div><code>cPassword</code> Password to encrypt the files</div>
<div><code>iSize</code> Size of the archive, in bytes. Default is 1457664 bytes</div>
<div><code>lWithPath</code> Toggle to store the path or not</div>
<div><code>lWithDrive</code> Toggle to store the Drive letter and path or not</div>
<div><code>pFileProgress</code> Codeblock for File Progress</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>lCompress</code> <code>.T.</code> if file was create, otherwise <code>.F.</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function creates a zip file named <code>cFile</code>. If the extension is omitted, .zip will be assumed. If the second parameter is a character string, this file will be added to the zip file. If the second parameter is an array, all file names contained in <code>aFiles</code> will be compressed.</div>
<div><p>If <code>nLevel</code> is used, it determines the compression type where 0 means no compression and 9 means best compression.</div>
<div><p>If <code>bBlock</code> is used, every time the file is opened to compress it will evaluate <code>bBlock</code>. Parameters of <code>bBlock</code> are <code>cFile</code> and <code>nPos</code>.</div>
<div><p>If <code>lOverWrite</code> is used, it toggles to overwrite or not the existing file. Default is to overwrite the file, otherwise if <code>lOverWrite</code> is false the new files are added to the <code>cFile</code>.</div>
<div><p>If <code>lWithPath</code> is used, it tells that the path should also be stored with the file name. Default is false.</div>
<div><p>If <code>lWithDrive</code> is used, it tells that the Drive and path should also be stored with the file name. Default is false.</div>
<div><p>If <code>pFileProgress</code> is used, a codeblock is evaluated, <code>showing</code> the total of that file has being processed. The codeblock must be defined as: <code>{| nPos, nTotal | GaugeUpdate( aGauge1, nPos / nTotal ) }</code></div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL aFiles, nLen, aGauge
IF hb_ZipFileByTDSpan( "test.zip", "test.prg" )
? "File was successfully created"
ENDIF
IF hb_ZipFileByTDSpan( "test1.zip", { "test.prg", "test.hbp" } )
? "File was successfully created"
ENDIF
IF hb_ZipFileByTDSpan( "test2.zip", { "test.prg", "test.hbp" }, 9, {| cFile, nPos | QOut( cFile ) }, "hello",, 521421 )
? "File was successfully created"
ENDIF
aFiles := { "test.prg", "test.hbp" }
hb_ZipFileByTDSpan( "test33.zip", aFiles, 9,,, "hello",, 6585452 )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
<section>
<h4><a href="#hb_ziptestpk" class="d-id" id="hb_ziptestpk" title="∞"><code>hb_ZipTestPK()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbziparc/ziparc.prg#L189" class="d-so" title="contrib/hbziparc/ziparc.prg">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=hb_ZipTestPK">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+hb_ZipTestPK">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbziparc/doc/en/ziparc.txt">Improve this doc</a></span></h4>
<div class="d-ol">Test pkSpanned zip files</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>hb_ZipTestPK( <cFile> ) → nReturnCode</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> File to be tested.</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>nReturn</code> A code that tells if the current disk is the last of a pkSpanned disk set.</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p>This function tests if the disk inserted is the last disk of an backup set or not. It will return the follow return code when an error is found</div>
<div class="d-t d-t1">
<div>Error code Meaning</div>
<div>114 Incorrect Disk</div>
<div>103 No Call back was set with hb_ZipTestPK()</div>
</div>
<div><p>Call this function to determine if the disk inserted is the correct one before any other function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">IF hb_ZipTestPK( "test22.zip" ) == 114
? "Invalid Diskette"
ENDIF
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Harbour specific</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">File</div>
<div class="d-it">Library is hbziparc</div>
<div class="d-d">Tag</div>
<div class="d-it">Zip Functions</div>
</section>
</main>
<footer>
<div>Generated by hbdoc on 2020-10-15 00:54 UTC</div>
<div>Based on revision <a href="https://github.com/vszakats/hb/tree/096e855">096e855</a></div>
<div>Content processing, layout & design © 2020 <a href="https://vsz.me/hb">vszakats</a></div>
</footer>
<script>
/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /gh/PrismJS/prism@1.17.1/prism.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,a=0,n={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):Array.isArray(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function e(t,a){var r,s,i=n.util.type(t);switch(a=a||{},i){case"Object":if(s=n.util.objId(t),a[s])return a[s];for(var l in r={},a[s]=r,t)t.hasOwnProperty(l)&&(r[l]=e(t[l],a));return r;case"Array":return s=n.util.objId(t),a[s]?a[s]:(r=[],a[s]=r,t.forEach(function(t,n){r[n]=e(t,a)}),r);default:return t}}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){var s=(r=r||n.languages)[e],i={};for(var l in s)if(s.hasOwnProperty(l)){if(l==t)for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);a.hasOwnProperty(l)||(i[l]=s[l])}var u=r[e];return r[e]=i,n.languages.DFS(n.languages,function(t,a){a===u&&t!=e&&(this[t]=i)}),i},DFS:function e(t,a,r,s){s=s||{};var i=n.util.objId;for(var l in t)if(t.hasOwnProperty(l)){a.call(t,l,t[l],r||l);var o=t[l],u=n.util.type(o);"Object"!==u||s[i(o)]?"Array"!==u||s[i(o)]||(s[i(o)]=!0,e(o,a,l,s)):(s[i(o)]=!0,e(o,a,null,s))}}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,a){var r={callback:a,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",r);for(var s,i=e.querySelectorAll(r.selector),l=0;s=i[l++];)n.highlightElement(s,!0===t,r.callback)},highlightElement:function(a,r,s){for(var i,l="none",o=a;o&&!t.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(t)||[,"none"])[1].toLowerCase(),i=n.languages[l]),a.className=a.className.replace(t,"").replace(/\s+/g," ")+" language-"+l,a.parentNode&&(o=a.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(t,"").replace(/\s+/g," ")+" language-"+l));var u={element:a,language:l,grammar:i,code:a.textContent},c=function(e){u.highlightedCode=e,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,n.hooks.run("after-highlight",u),n.hooks.run("complete",u),s&&s.call(u.element)};if(n.hooks.run("before-sanity-check",u),u.code)if(n.hooks.run("before-highlight",u),u.grammar)if(r&&e.Worker){var g=new Worker(n.filename);g.onmessage=function(e){c(e.data)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else c(n.highlight(u.code,u.grammar,u.language));else c(n.util.encode(u.code));else n.hooks.run("complete",u)},highlight:function(e,t,a){var s={code:e,grammar:t,language:a};return n.hooks.run("before-tokenize",s),s.tokens=n.tokenize(s.code,s.grammar),n.hooks.run("after-tokenize",s),r.stringify(n.util.encode(s.tokens),s.language)},matchGrammar:function(e,t,a,s,i,l,o){for(var u in a)if(a.hasOwnProperty(u)&&a[u]){if(u==o)return;var c=a[u];c="Array"===n.util.type(c)?c:[c];for(var g=0;g<c.length;++g){var d=c[g],p=d.inside,m=!!d.lookbehind,f=!!d.greedy,h=0,b=d.alias;if(f&&!d.pattern.global){var y=d.pattern.toString().match(/[imuy]*$/)[0];d.pattern=RegExp(d.pattern.source,y+"g")}d=d.pattern||d;for(var F=s,v=i;F<t.length;v+=t[F].length,++F){var k=t[F];if(t.length>e.length)return;if(!(k instanceof r)){if(f&&F!=t.length-1){if(d.lastIndex=v,!(S=d.exec(e)))break;for(var w=S.index+(m?S[1].length:0),A=S.index+S[0].length,x=F,P=v,$=t.length;x<$&&(P<A||!t[x].type&&!t[x-1].greedy);++x)w>=(P+=t[x].length)&&(++F,v=P);if(t[F]instanceof r)continue;_=x-F,k=e.slice(v,P),S.index-=v}else{d.lastIndex=0;var S=d.exec(k),_=1}if(S){m&&(h=S[1]?S[1].length:0);A=(w=S.index+h)+(S=S[0].slice(h)).length;var j=k.slice(0,w),C=k.slice(A),E=[F,_];j&&(++F,v+=j.length,E.push(j));var N=new r(u,p?n.tokenize(S,p):S,b,S,f);if(E.push(N),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=_&&n.matchGrammar(e,t,a,F,v,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,s=0;r=a[s++];)r(t)}},Token:r};function r(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r}if(e.Prism=n,r.stringify=function(e,t){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return r.stringify(e,t)}).join("");var a={type:e.type,content:r.stringify(e.content,t),tag:"span",classes:["token",e.type],attributes:{},language:t};if(e.alias){var s=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,s)}n.hooks.run("wrap",a);var i=Object.keys(a.attributes).map(function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(i?" "+i:"")+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(n.disableWorkerMessageHandler||e.addEventListener("message",function(t){var a=JSON.parse(t.data),r=a.language,s=a.code,i=a.immediateClose;e.postMessage(n.highlight(s,n.languages[r],r)),i&&e.close()},!1),n):n;var s=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return s&&(n.filename=s.src,n.manual||s.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),n}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s\/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var a={};a["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};n["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var a=e.languages.markup;a&&(a.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},a.tag))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(e){e=e||document;var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(e.querySelectorAll("pre[data-src]")).forEach(function(e){if(!e.hasAttribute("data-src-loaded")){for(var a,n=e.getAttribute("data-src"),r=e,s=/\blang(?:uage)?-([\w-]+)\b/i;r&&!s.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(s)||[,""])[1]),!a){var i=(n.match(/\.(\w+)$/)||[,""])[1];a=t[i]||i}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var o=new XMLHttpRequest;o.open("GET",n,!0),o.onreadystatechange=function(){4==o.readyState&&(o.status<400&&o.responseText?(l.textContent=o.responseText,Prism.highlightElement(l),e.setAttribute("data-src-loaded","")):o.status>=400?l.textContent="✖ Error "+o.status+" while fetching file: "+o.statusText:l.textContent="✖ Error: File does not exist or is empty")},o.send(null)}}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-src")&&t.hasAttribute("data-download-link")){var a=t.getAttribute("data-src"),n=document.createElement("a");return n.textContent=t.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()}));
//# sourceMappingURL=/sm/a264a97a2f20660266cd3a454fb3decaf16e29e2a9ecf5259f4176ddbec26e70.map
</script>
<script>
Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean;
</script>
<script src="jquery.min.js"></script>
<script src="https://os.allcom.pl/hb/static/playground-embed.js" crossorigin="anonymous"></script>
<script src="https://os.allcom.pl/hb/static/play.js" crossorigin="anonymous"></script>
<script>
'use strict';
$(function() {
initPlayground(hbioTransport());
});
</script>