I'm looking for a way to automatically handle decompression of files within JS but I'm not seeing any such methods. I was wonder if maybe Archive could be extend to just uncompress .gz .zip .lzh or whatever files or maybe a new method for (de)compression of files.
Maybe something exists already but I'm not seeing it.
Archive has a method called extract().
https://www.synchro.net/docs/jsobjs.html#Archive_class
Re: uncompression
By: Nightfox to nelgin on Tue May 06 2025 12:20:23
Archive has a method called extract().
https://www.synchro.net/docs/jsobjs.html#Archive_class
That extracts from archives or containers. It does not uncompress .gz files.
Right, .gz files aren't archives. No plan to support them directly in SBBS. .tgz / .tar.gz files *are* supported however.
Re: uncompression
By: Digital Man to nelgin on Tue May 06 2025 14:05:15
Right, .gz files aren't archives. No plan to support them directly in S .tgz / .tar.gz files *are* supported however.
"No plan to support" = "If you want it, add it yourself" ? :)
files.
Right, .gz files aren't archives. No plan to support them directly in SBBS. .tgz / .tar.gz files *are* supported however.
Re: uncompression
By: Digital Man to nelgin on Tue May 06 2025 02:05 pm
files.
Right, .gz files aren't archives. No plan to support them directly in SBBS. .tgz / .tar.gz files *are* supported however.
well a .gz file is a single compressed file, right?
so why are you saying it's not an archive format?
it doesn't really make a lot of sense.. gzip isn't really used that way except for edge cases
Right, .gz files aren't archives. No plan to support them directly in SBBS. .tgz / .tar.gz files *are* supported however.
well a .gz file is a single compressed file, right?
No, it's a block of compressed data which may not have originally been a file.
so why are you saying it's not an archive format?
Becaue it's not. An archive file/format contains one or more files, their data/contents and metadata about those files (e.g. file name, date/time, size, checksum) - a .gz file doesn't contain any of that.
A .tar file is an archive.
A .gz file is compressed data.
A .tar.gz (or .tgz) is a compressed archive.
Re: uncompression
By: Digital Man to MRO on Tue May 06 2025 05:58 pm
Right, .gz files aren't archives. No plan to support them directly in SBBS. .tgz / .tar.gz files *are* supported however.
well a .gz file is a single compressed file, right?
No, it's a block of compressed data which may not have originally been a file.
so why are you saying it's not an archive format?
Becaue it's not. An archive file/format contains one or more files, their data/contents and metadata about those files (e.g. file name, date/time, size, checksum) - a .gz file doesn't contain any of that.
A .tar file is an archive.
A .gz file is compressed data.
A .tar.gz (or .tgz) is a compressed archive.
well i only worked with .gz files long ago. but only when i HAD to, so i'm a bit confused about why you think that it's not an archive format.
so i used gzip and created an archive
root@linux:~# gzip -l shit.rar.gz
compressed uncompressed ratio uncompressed_name
12861660 12860366 -0.0% shit.rar
root@linux:~# gzip -l -v shit.rar.gz
method crc date time compressed uncompressed ratio uncompressed_name
defla d61855b3 Sep 7 12:47 12861660 12860366 -0.0% shit.rar
as you can see, the archive i created shows crc, date time the compressed and uncompressed size, the ratio and the uncompressed filename https://i.imgur.com/EwYcPym.png
so it meets the criteria you mentioned for archives, right?
so yes, it's one file but it's a compressed archive.
Re: Re: uncompression
By: fusion to nelgin on Tue May 06 2025 20:31:00
it doesn't really make a lot of sense.. gzip isn't really used that way except for edge cases
Welcome to my edge case.
at least write what that edge case is ya twat
so why are you saying it's not an archive format?
Becaue it's not. An archive file/format contains one or more files, their data/contents and metadata about those files (e.g. file name, date/time, size, checksum) - a .gz file doesn't contain any of that.
as you can see, the archive i created shows crc, date time the compressed and uncompressed size, the ratio and the uncompressed filename https://i.imgur.com/EwYcPym.png
Those header fields are optional: https://en.wikipedia.org/wiki/Gzip
so it meets the criteria you mentioned for archives, right?
No.
so yes, it's one file but it's a compressed archive.
If a library can only store one book, is it still a library? No, it's not.
it doesn't really make a lot of sense.. gzip isn't really used that way except for edge cases
Welcome to my edge case.
at least write what that edge case is ya twat
Re: uncompression
By: Digital Man to MRO on Tue May 06 2025 08:54 pm
so why are you saying it's not an archive format?
Becaue it's not. An archive file/format contains one or more files, their data/contents and metadata about those files (e.g. file name, date/time, size, checksum) - a .gz file doesn't contain any of that.
as you can see, the archive i created shows crc, date time the compressed and uncompressed size, the ratio and the uncompressed filename https://i.imgur.com/EwYcPym.png
Those header fields are optional: https://en.wikipedia.org/wiki/Gzip
if it's optional how does that matter?
so it meets the criteria you mentioned for archives, right?
No.
I listed all the criteria you mentioned and met it with a gzip archive. furthermore, gzip refers to them as archives. https://www.gnu.org/software/gzip/manual/gzip.html
Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).
Mandatory arguments to long options are mandatory for short options too.
-c, --stdout write on standard output, keep original files unchanged
-d, --decompress decompress
-f, --force force overwrite of output file and compress links
-h, --help give this help
-k, --keep keep (don't delete) input files
-l, --list list compressed file contents
-L, --license display software license
-n, --no-name do not save or restore the original name and timestamp
-N, --name save or restore the original name and timestamp
-q, --quiet suppress all warnings
-r, --recursive operate recursively on directories
--rsyncable make rsync-friendly archive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IN YOUR FACE!
so yes, it's one file but it's a compressed archive.
If a library can only store one book, is it still a library? No, it's not.
if it only had ONE, very good book it would be called the library of [good book].
Per Wikipedia:
Compressed archives are typically created by assembling collections of files into a single tar archive (also called tarball),[7] and then compressing that archive with gzip. The final compressed file usually has the extension .tar.gz or .tgz.
Re: uncompression
By: Digital Man to MRO on Wed May 07 2025 05:44 pm
Per Wikipedia:
Compressed archives are typically created by assembling collections of files into a single tar archive (also called tarball),[7] and then compressing that archive with gzip. The final compressed file usually has the extension .tar.gz or .tgz.
Are you seriously referencing wikipedia, a site that anybody can edit?
how about i just change it for ya?
Sysop: | Compctech |
---|---|
Location: | Winchester, VA |
Users: | 3 |
Nodes: | 4 (0 / 4) |
Uptime: | 244:03:44 |
Calls: | 71 |
Calls today: | 71 |
Messages: | 7,817 |
Posted today: | 4 |