Skip to content

Instantly share code, notes, and snippets.

View lazarospsa's full-sized avatar
convert("coffee"){ return code; }

Lazaros Psarokostas lazarospsa

convert("coffee"){ return code; }
View GitHub Profile
@lazarospsa
lazarospsa / compress.php
Last active April 1, 2023 17:45
PHP compress file without library
function compress_file($input_file, $output_file) {
// Open the input file for reading
$input_handle = fopen($input_file, 'rb');
if (!$input_handle) {
echo "Failed to open input file\n";
return;
}
// Open the output file for writing
$output_handle = fopen($output_file, 'wb');