VisualNEO Win Plugin Manual

neoZip Plugin Manual for VisualNEO Win

Plugin ID:com.visualneo.neozip
Version:2.0.0
Suite:VisualNEO Automation & AI Suite (Commercial)
Publisher:SinLios
Category:Utility / ZIP Compression & Archives

1. What is neoZip?

neoZip is a native, high-performance compression and archiving plugin for VisualNEO Win.

With neoZip, your applications can create, extract, modify, inspect, and verify .zip and .gz archives without needing 7-Zip, WinRAR, or external command-line tools. Everything runs natively in-process inside your VisualNEO application with zero third-party DLL dependencies.

Key Capabilities:

  • Standard ZIP Archive Creation: Package individual files or entire directory trees (recursively) with custom compression levels.
  • Direct In-Memory Archiving: Add text content or JSON payloads straight into a ZIP file without creating temporary files on disk.
  • Direct In-Memory Extraction: Read text files (logs, configuration, CSVs) located inside a ZIP directly into VisualNEO variables without extracting anything to the hard drive.
  • Selective Extraction: Extract only files that match wildcard patterns (e.g. *.pdf;*.docx).
  • Deep Archive Inspection (JSON): List all files with uncompressed sizes, compressed sizes, compression ratios (%), and timestamps.
  • Archive Health & Comments: Check ZIP archive validity and manage global archive comments.
  • GZip Stream & File Compression: Compress single files to .gz or compress text strings into compact Base64 payloads.
  • Safe Extraction: Rejects absolute paths, traversal entries and decompression bombs before archive extraction starts.

2. Quick Start: Archiving and Extracting in 3 Minutes

Step 1: Create a ZIP Archive and Add Files

TEXT
. Create an empty ZIP file
neoZipCreate "[PubDir]MyBackup.zip" "deflate"

. Add a file into the root of the ZIP
neoZipAddFile "[PubDir]MyBackup.zip" "C:\MyDocs\report.pdf" "report.pdf" "deflate"

. Add an entire folder with all subdirectories into a 'docs' folder inside the ZIP
neoZipAddFolder "[PubDir]MyBackup.zip" "C:\MyDocs\Projects" "docs" "True" "deflate"

Step 2: Extract Everything from a ZIP Archive

TEXT
. Extract all files into the 'C:\RestoredDocs' folder
neoZipExtractAll "[PubDir]MyBackup.zip" "C:\RestoredDocs" "True"
AlertBox "Success" "Files extracted successfully!"

Step 3: Read a Text File from Inside a ZIP (No Extraction Needed!)

TEXT
. Read 'readme.txt' inside the archive directly into the variable [MyReadme]
neoZipExtractToText "[PubDir]MyBackup.zip" "docs/readme.txt" "UTF-8" "[MyReadme]"
AlertBox "ReadMe Content" "[MyReadme]"

3. Real-World Practical Examples

Example 1: Creating an Automated Backup System

Compress your application's database and data files with date-stamped naming:

TEXT
. Build archive path with today's date
SetVar "[BackupZip]" "[PubDir]Backup_[Year]-[MonthNum]-[DayNum].zip"

. Create archive and add data folder
neoZipCreate "[BackupZip]" "deflate"
neoZipAddFolder "[BackupZip]" "[PubDir]Data" "Data" "True" "deflate"

. Add an in-memory text log with backup metadata
neoZipAddText "[BackupZip]" "Backup created on [Date] at [Time] by [UserName]" "backup_info.txt" "UTF-8"

. Set archive comment
neoZipCommentSet "[BackupZip]" "VisualNEO Auto-Backup System v1.0"
AlertBox "Backup Complete" "Your data has been compressed to: [BackupZip]"

Example 2: Inspecting ZIP Contents (Populating a List or Grid)

Get full JSON details of all entries inside a ZIP file:

TEXT
neoZipList "[PubDir]update_package.zip" "[ZipFilesJson]"
. [ZipFilesJson] contains an array of objects:
. [{"name":"app.exe","path":"bin/app.exe","uncompressedSize":2451000,"compressedSize":1120000,"compressionRatio":54.3,"modified":"2026-08-15 14:30:00","isDirectory":false}, ...]

Example 3: Extracting Only Specific Files (Wildcard Mask)

Extract only image files from a ZIP archive:

TEXT
neoZipExtractMatching "[PubDir]assets.zip" "*.png;*.jpg;*.svg" "[PubDir]ExtractedImages" "True"

Example 4: Compressing Large Text/JSON Strings (GZip Base64)

Compress a huge text or JSON payload before sending it over network or saving to a database:

TEXT
. Compress text string into compact Base64
neoZipGZipCompressString "[HugeJsonString]" "[CompressedBase64]"

. Later, restore the text
neoZipGZipDecompressString "[CompressedBase64]" "[RestoredJsonString]"

4. Complete Action Reference

ZIP Creation & Modification

ActionParametersDescription
neoZipCreate"[ZipPath]" "[CompressionLevel]"Creates a new empty .zip file (deflate or store).
neoZipAddFile"[ZipPath]" "[SourceFile]" "[InternalZipPath]" "[CompressionLevel]"Adds a file to a new or existing ZIP archive.
neoZipAddFolder"[ZipPath]" "[SourceFolder]" "[InternalZipFolder]" "[Recursive]" "[Level]"Adds an entire directory tree to the archive.
neoZipAddText"[ZipPath]" "[Text]" "[InternalPath]" "[Encoding]"Adds text directly from RAM into the archive without disk files.
neoZipDeleteFile"[ZipPath]" "[InternalZipPath]"Deletes a file entry from inside the archive.

ZIP Extraction

ActionParametersDescription
neoZipExtractAll"[ZipPath]" "[DestFolder]" "[Overwrite]"Extracts all archive contents to destination folder.
neoZipExtractFile"[ZipPath]" "[InternalZipPath]" "[DestFilePath]" "[Overwrite]"Extracts a single file by internal path.
neoZipExtractMatching"[ZipPath]" "[FilterMask]" "[DestFolder]" "[Overwrite]"Extracts files matching mask (e.g. *.txt;*.pdf).
neoZipExtractToText"[ZipPath]" "[InternalZipPath]" "[Encoding]" "[VarResult]"Reads text from ZIP straight into a variable without extraction.

ZIP Inspection & Health

ActionParametersDescription
neoZipList"[ZipPath]" "[VarJsonResult]"Returns detailed JSON array with all files, sizes and timestamps.
neoZipGetCount"[ZipPath]" "[VarCount]"Returns total number of files inside the archive.
neoZipFileExists"[ZipPath]" "[InternalZipPath]" "[VarExists]"Checks if a file exists inside the archive (True/False).
neoZipGetInfo"[ZipPath]" "[VarJsonResult]"Returns summary JSON stats (total uncompressed/compressed bytes, ratio).
neoZipIsValid"[ZipPath]" "[VarIsValid]"Verifies archive structural integrity (True/False).
neoZipCommentGet"[ZipPath]" "[VarComment]"Retrieves the global embedded ZIP comment.
neoZipCommentSet"[ZipPath]" "[Comment]"Sets the global embedded ZIP comment.

Fast GZip Operations

ActionParametersDescription
neoZipGZipCompressFile"[SourceFile]" "[DestGzFile]"Compresses a file into standard .gz format.
neoZipGZipDecompressFile"[SourceGzFile]" "[DestFile]"Decompresses a .gz file back to original file.
neoZipGZipCompressString"[Text]" "[VarBase64Gz]"Compresses text string into Base64 GZip payload.
neoZipGZipDecompressString"[Base64GzPayload]" "[VarText]"Decompresses Base64 GZip payload back into text.

5. Interactive Demo

Open demo/neoZip-demo.pub in VisualNEO Win to test ZIP creation, in-memory archiving, selective extraction, archive listing, and GZip compression interactively.

6. Extraction Safety Limits

Before writing any selected ZIP entry, neoZip validates the complete extraction set. Internal paths containing drive names, absolute roots, empty segments, . or .. are rejected.

  • Maximum entries per archive: 100,000.
  • Maximum uncompressed size per entry: 256 MB.
  • Maximum total extraction size: 2 GB.
  • Maximum expansion ratio per entry: 1000:1.
  • Maximum text entry returned to a variable: 16 MB.
  • Maximum GZip file output: 512 MB; GZip text output is limited to 16 MB.
  • Extracted files are written through temporary files, so a failed operation does not leave a partial destination.