function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CRMfusion - GWCRMfusion - GW 

Compression with the BULK API and .NET

Does anyone have any samples of how to use compression with the BULK API and .net.  I've got CSV working great but as soon as I try to create a job with a contenttype of ZIP_CSV I start getting 400 errors from my HTTPResponse

Wondering whether you managed to obtain working .NET samples as I am also having issues, but in a different form as follows:
1. After creating a job on the SFDC Server, with a single batch with the aim of performing a bulk api query...
2. I request the batch query results and send the following header which asks for the results to be GZipped: Accept-Encoding: gzip
3. I download the response onto Windows Server 2003 using the following (simplified) code: wc.DownloadFile(requestUrl, filename); //(where wc is my .NET web client, requestUrl is the location of the query result on the SFDC Server and filename is the local file into which the GZipped results should be saved).
4. The results file is saved to my local file system successfully , but is not a valid zip file.

Anny attempt to open / decompress the file (using windows explorer) results in error "The Compressed (zipped) Folder 'my file name' is invalid".

I have also tried downloading the results as a stream and decompressing in memory, but the result is always same, and suggests that the compressed result is not valid.
I am wondering whether there is some type of encoding mismatch as the result is saved to the Windows Server file system.

Any help in the form of working samples would be greatly appreciated.