Skip to content

Instantly share code, notes, and snippets.

View dannashao's full-sized avatar

Danna Shao dannashao

View GitHub Profile
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
set "LONG_PATH_PREFIX=//?/"
:start
:: ======== CONFIGURATION ========
:: Change your target folder, output directory and split size here! (Set split size smaller than 8192m if uploading to YODA). For your remote path if you wish to upload after compression, check with "ibridges list".
import os
import time
import base64
import subprocess
import sys
import re
from datetime import datetime
def run_cmd(cmd):
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
@dannashao
dannashao / incremental_compression.py
Last active May 16, 2025 13:52
Incremental compression script (python+zstd)
"""
This script monitors a folder for new files and compresses them periodically using tar and Zstandard (zstd). It supports:
- Incremental backups (only compresses newly added or modified files)
- High compression levels (with options for speed/multithread)
- File integrity verification via checksums
- Automatic logging of backup metadata
CONFIGURATION:
- watch_dir: Path to monitor for file files.
- output_dir: Where compressed output will be stored.