<img src="https://git.hkwtc.org/TC/fszip/raw/master/title.png">
# fszip

ArOZ Online System File Explorer - File System Zipping Backgroundworker, design to replace the legacy zipping PHP script.

## What is File System Zipping Backgroundworker?

File System Zipping Backgroundworker - Short for fszip, is a backgound working script that is design to replace the current
PHP based zipping method used by the file explorer. This work similar to fsexec with asynchonized design to prevent the main
PHP server from freezing due to the zipping process. This is particularly useful on low power host like the Raspberry Pi Zero
series. 

## How can I use the fszip?
Although we strongly recommend using the fszip via file explorer API, you can call the binary directly with the following command.

```
./fsexec {uuid} {command_in_base64_encoded_JSON_string}
```
The command has to be in one of the format that fits the following rule

```
// Command Structure:
// [{"zip" / "unzip", "{source}", "{target}"]

//Examples
//["zip","test","test.zip"]
//Zip the folder "test" into "test.zip"

./fszip uuid1 WyJ6aXAiLCJ0ZXN0IiwidGVzdC56aXAiXQo=

//["unzip","test.zip","unzip"]
//Unzip the folder "test.zip" to unzip/

./fszip uuid2 WyJ1bnppcCIsInRlc3QuemlwIiwidW56aXAiXQo=

```

## Log file and command conversion detail
Please take a look at fsexec's README file for more examples.

## License
CopyRight Author Toby Chui under ArOZ Online Project, 2019
