That's great Mary - the zip file you upload should basically be in the same format as the one you downloaded (you can even just add or edit files in that zip and re-upload it).
Testing and QA
Good to know how it works. But it would also be useful if Moodle could test if the folder as been zipped, and search files there in the zip (avoiding people who zip the folder to have problems).
Cool if it can be done for 2.4, or to keep in mind for 2.4.1
The folders will not be recreated in the zip - you will just get a list of all the files for that student whether they were in a folder or not.