Home

Blog Page

Why the hell would it do that?

26 August 2024

I had an idea (crazy i know) to hide messages inside the data of image files just so i could say to some random idiot "hey you did it nerd, congrats and ____ you". So what did I do? One word, Notepa- thats two. So I opened up notepad and started typing, after all, I had corrupted files like this before. It'll be as easy as plucking the hairs off a bald cat. So I added some text and saved the ima- Corrupted. The same way as if I had just changed the file extension, bummer. What if I just changed a single lette- Corrupted. Oh, What if I change the letter, save, then change it ba- Corrupted. Huh. What if I dont change anything and just save the fi- Corrupted.
You can probably guess that I lost my ____ at that, but what exactely happened? Well, after a few more tests I found that the notepad-saved image had no metadata for the image width, height or dimensions. My brain immediately went to the obvious place to learn more but it was correlation not causation. Google led me to reddit, archive.org, superuser and wikipedia (again), but heres what I learnt. Lets start with how files store data. As far as I'm aware, files have three sections, a header with information about what type of file the file is, the content which is the content, and the footer, which tells the system that any data afterward is not what you're looking for. Now for the Notepad stuff. Notepad shows text to you in the standard ASCII, which is normal. It has a huge list of characters and numbers and its a mix and match thing. What it doesnt know how to do is null characters (hex 00), so instead of throwing a hissy fit and crashing, it changes it to a space. Cool righ- WRONG. Spaces have a different value (hex 20) from null characters and as such, the header of the file gets its 00s turned into 20s (which is reversible) and the file is unreadable because the OS thinks that the file extension is wrong and you're trying to do something funky. If you're trying anything similar to this, I recommend getting/using subline, its free. Here, try to decode this image (hint, the first 4 hexadecimal digits were increased by 1, gl :3)

My file is too massive

17 June 2024

As of recent, I was attempting to decrease the file size of a file on my computer named chez.mp4. My goal was to go from a 178 MB (184,570,321 bytes) MP4 file that lasted about three hours (12,003 seconds) to a file that had the same runtime but was less than 25MB. Thus my journey down the search results had begun.
I couldn't recommend freecompress.com as I had to wait about two and a half hours for it to do its thing, but after it reached 100% it had, firstly, increased the file size by about 25% (199.9MB) and, secondly, it told me that I couldn't even download the larger file because it took over an hour. I'd assume that the thing works with smaller files and probably does a good job too, but for my usecases, it just wasn't for me.
Next I tried to use clideo.com but the only upside of using their service is that it is super speedy, its incredible and only took about five minuites. However, they dont provide a watermark free version unless you sign in/up which is a dealbreaker regardless, and even then it was only about 13% of difference (154.7MB) so, I'll pass
After that, I attempted to use compress-video-online.com which seems perfect on the surface, but when I attempted to put my huge file in, it just couldn't handle the sheer length of it and went kaput which is a shame because there is a perfect slider that lets you choose the size of the output and it even comes without a watermark, but alas, my file was too massive.
My last attempt was with compressvideo.io which was a faliure as it only dropped the size by 35% (113.52MB).
So thats where my story ends, I'll probably just use catbox.moe like a normal person, but still, its the thought that counts