I am experimenting grpc
for transferring large files and directories from server to clients. When I transfer a directory, I use the zip
package to create a zip writer to create an archive of the directory, which is then transferred using grpc.
zipfile, err := os.Create(target)
zip.NewWriter(zipfile)
This works, but I was wondering if there's any convenient way to read a directory and its contents (files and sub-directories) into a []byte array for transfer over the wrire.