Basically Azure Files offers fully managed file shares that can be accessed by SMB or NFS protocol.
Azure Fileshare offers programmability through
- https://learn.microsoft.com/en-us/dotnet/api/system.io.file
- https://learn.microsoft.com/en-us/previous-versions/azure/dn261237(v=azure.100)
- https://learn.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api
So basicically you can do your own compression while writing data to azure fileshare. Some references (though not directly related to azure file share), you may be able to use the concepts to implement in Azure FileShare.
See samples of how to programatically access Azure File Share, you may use these references to compress data and write.
https://learn.microsoft.com/en-us/azure/storage/files/storage-dotnet-how-to-use-files?tabs=dotnet
Hope this helps.