Why?
This "format" is just a joke and i dont really want to mantain it and plus its almost complete
The WORST format ever!
File Name | Original Size | .WTF Size | Increase (%) |
---|---|---|---|
Hello World.txt | 11 bytes | 636 bytes | 5763.64 |
2K Wallpaper | 7.3 MB | 351 MB | 4705.48 |
1024x1024 JPG | 92 KB | 4.4 MB | 4597.83 |
4 Minutes MP3 | 6.7 MB | 319 MB | 4747.76 |
4K MC Screenshot | 18.8 MB | 891 MB | 4721.28 |
Data is took on WTF 1.1 (Package Version 2) |
- filename (String)
- author (String)
- version (Integer)
- pack_ver (Integer)
- hash (String) (only on package version 2)
- description (String) (only on package version 3)
- license (String) (only on package version 3)
- created_unix (Integer) (only on package version 3)
{'filename': 'main.py', 'author': 'Testing', 'version': 1, 'pack_ver': 2, 'hash': 'AAAAAAAAAAAAA'}
WTF Bit | Regular Bit |
---|---|
fuck | 0 |
fucked | 1 |
convert_to_wtf function reads the file's bits and converts it according to the table above
- .WTF file (saved as .WTFA)
- ZIP Archive (no compression)
- WTF file
- Original File
- WTF File
- File 2
- WTF file
- ZIP Archive (no compression)
archive_file() does the following this in order to make the final .wfta archive file
- Gets all files in archive_target
- Runs convert_to_wtf()
- Makes the .ZIP archive with the .WTF files
- Runs convert_to_wtf() to the .ZIP file which results in the final archive (.WTFA)
Convert demo.mov to demo.wtf and back to .mov
import wtf
wtf.convert_to_wtf("demo.mov", "demo.wtf")
wtf.convert_wtf_to_file("demo.wtf", "demo.mov")
Read a .wtf file's metadata and set the author to Proton0
import wtf
meta = wtf.Metadata("demo.wtf")
print(meta.get_metadata()) # Prints the entire metadata of the file
print(meta.get_value("author")) # Prints the 'author'
meta.edit("author", "Proton0") # Sets the author to Proton0
print(meta.get_value("author")) # Prints the new author
Create a archive called "archive.wfta" and then extract it as "extracted"
import wtf
wtf.archive_files("archive_target", "archive.wtfa")
wtf.unarchive_files("archive.wtfa", "extracted")
Create the following folders like this below
- tests
- testdata (Put files you want to converted to .wtf)
- ziptest (Put files you want to be archived)
- corrupted_data (Corrupted .WTF or .WTFA files here)
Finally run main.py
python3 main.py
I dont really know why