I have a gaming laptop and a phone, both of which have USB 3.2 Gen 2 and Gen 1 ports. I also use a USB 4 Type-C cable. Now, recently, I have downloaded music files of over 300GB. If I transfer them one by one, it takes a lot of time. Today, I compressed the folder to a single zip file, and the transfer finished in less than 20m. Why is that so?


for each file, the computer has to ask the phone about the file, wait for the phone to process the file request, and respond. Then it can start transferring the file. With a single file, it can copy everything in one go without stopping.
You’re basically being bottlenecked by your phone’s CPU, and by high latency in a single-threaded task.
No, is not the phone’s CPU. I guarantee you that can process several gigabytes a second.
It’s the overhead of all that handshaking and confirmation coming over USB, and having to be verified with the sometimes slow phone storage chips or worse on a microSD.
It’s IO overhead and waiting all over the place, not a CPU bottleneck.
Why does this overhead not exist when I’m sending files over USB to an external HDD or flash drive?
I have an external HDD array connected via USB 3.2 and it handles file transfers same as a SATA drive. There’s no handshaking beyond the initial negotiation of the USB connection, certainly not on a per-file basis.
That’s using eSATA for a protocol and not USB in all likelihood. Also a lot of the handshaking and confirmation come from the USB driver itself. You won’t see anything fancy, it’ll just be annoyingly slow.