GENERATED: MAY 4,2023 - 8:12AM
BulkShrinkFiles/BulkGrowFiles [V10.23.05. 27.03]

Previous Page

This application uses the generic template EmbedDiskFunctions to attach a class called HNDDISK to your application procedures. The application illustrates the use of two HNDDISK functions:
OBJ.BulkShrinkFiles() -> OBJ.ShrinkFile()
OBJ.BulkGrowFiles() -> OBJ.GrowFile()

The HNDDISK Class provides several different Compression and Decompression methods including memory and file compression and decompression as well as ZIP compression and decompression.

The SHRINK and GROW functions provide CHT proprietary file compression and decompression capabilities that are pure Clarion code using internal Clarion functions created for that purpose.

During SHRINK, the target file is read into a memory buffer, the memory buffer is compressed in-memory (by Clarion's COMPRESS function) and then written to disk as binary bytes.

During GROW, the target file is read into a memory buffer, the memory buffer is decompressed in-memory (by Clarions DECOMPRESS function) and then written to disk as binary bytes.

The SHRINK version of a file is given the extension .HNZ, and the original file name and extension ae retained inside a file header embedded in the .HNZ file. Hence, the GrowFile() function is able to re-establish a fully expanded version of the original file including the file extension.

SHRINK and GROW are also optionally encryption capable. When encryption is enabled, the compressed file is given the extension .HZY.

CHT proprietary compression and encryption provided by these functions are extremely useful for secure file transport via email, FTP and HTTP since the decompression phase can only be performed by another CHT application that is made aware of the encryption password or by a CHT Clarion procedure built into your CHT email application, CHT FTP application or CHT Web Server.

See also HNDCPYDM.APP for more examples including file encryption.

Count Global Template Name Qty Global Template Description
(0001) AACHTControlPanel(HNDTools) 1 © CHT AACHTControlPanel • (TIER-1) •
(0002) ApplicationImagesEx(HNDTools) 1 © CHT ApplicationImagesEx • (TIER-1) •
(0003) HNDCMPControlPanel(HNDTools) 1 © CHT HNDCMPControlPanel • (TIER-2) •
(0004) HandyVersionResource(HNDTools) 1 © CHT HandyVersionResource • (TIER-1) •
(0005) INIFile(HNDTools) 1 © CHT INIFile • (TIER-1) •
(5) Global Templates • (TIER-2)

 1 – Template Type: Window
  – – Procedure Name: GrowFiles()
Count Local Template Name Qty Local Template Description
(0006) EmbedDiskFunctions(HNDTools) 1 © CHT EmbedDiskFunctions • (TIER-2) •
(0007) EmbedWindowFunctions(HNDTools) 1 © CHT EmbedWindowFunctions • (TIER-2) • (CODE-TABS) •
(0008) HandyApplicationIniFetch(HNDTools) 3 © CHT HandyApplicationIniFetch • (TIER-1) • (15)
(0009) HandyApplicationIniPut(HNDTools) 3 © CHT HandyApplicationIniPut • (TIER-1) • (9)
(0010) PostControlEvent(HNDTools) 1 © CHT PostControlEvent • (TIER-1) • (6)
(0011) ProcedureImagesEx(HNDTools) 1 © CHT ProcedureImagesEx • (TIER-1) • (CODE-TABS) •
(6) Local Templates • (TIER-2)

 2 – Template Type: Frame
  – – Procedure Name: Main()
Count Local Template Name Qty Local Template Description
(0012) AppStartSplashProcedure(HNDTools) 1 © CHT AppStartSplashProcedure • (TIER-1) • (CODE-TABS) •
(0013) DateTimeDisplay(ABC) 1 Display the date and/or time in the current window
(0014) EmbedWindowFunctions(HNDTools) 1 © CHT EmbedWindowFunctions • (TIER-2) • (CODE-TABS) •
(0015) HandyHelpFileFetch(HNDTools) 2 © CHT HandyHelpFileFetch • (TIER-1) • (6)
(0016) ProcedureImagesEx(HNDTools) 1 © CHT ProcedureImagesEx • (TIER-1) • (CODE-TABS) •
(5) Local Templates • (TIER-2)

 3 – Template Type: Splash
  – – Procedure Name: JumpStartSplash07()
Count Local Template Name Qty Local Template Description
(0017) AppBuildDateTimeStamp(HNDTools) 1 © CHT AppBuildDateTimeStamp • (TIER-2) •
(0018) AppBuildNumberStamp(HNDTools) 1 © CHT AppBuildNumberStamp • (TIER-2) •
(0019) AppCopyRightStamp(HNDTools) 1 © CHT AppCopyRightStamp • (TIER-2) •
(0020) EmbedWindowFunctions(HNDTools) 1 © CHT EmbedWindowFunctions • (TIER-2) • (CODE-TABS) •
(0021) HandyTellMeControl(HNDTools) 1 © CHT HandyTellMeControl • (TIER-2) • (2)
(0022) ProcedureImagesEx(HNDTools) 1 © CHT ProcedureImagesEx • (TIER-1) • (CODE-TABS) •
(6) Local Templates • (TIER-2)

 4 – Template Type: Window
  – – Procedure Name: ShrinkFiles()
Count Local Template Name Qty Local Template Description
(0023) EmbedDiskFunctions(HNDTools) 1 © CHT EmbedDiskFunctions • (TIER-2) •
(0024) EmbedWindowFunctions(HNDTools) 1 © CHT EmbedWindowFunctions • (TIER-2) • (CODE-TABS) •
(0025) HandyApplicationIniFetch(HNDTools) 3 © CHT HandyApplicationIniFetch • (TIER-1) • (15)
(0026) HandyApplicationIniPut(HNDTools) 3 © CHT HandyApplicationIniPut • (TIER-1) • (17)
(0027) PostControlEvent(HNDTools) 1 © CHT PostControlEvent • (TIER-1) • (6)
(0028) ProcedureImagesEx(HNDTools) 1 © CHT ProcedureImagesEx • (TIER-1) • (CODE-TABS) •
(6) Local Templates • (TIER-2)

Copyright © 1996-2023 - CHT Version: [27B.00.00]
Gus M. Creces, CLARION HANDY TOOLS
All Rights Reserved Worldwide

chtlogo001.gif
Application Templates