pdalcol / zippex Goto Github PK
View Code? Open in Web Editor NEWNative Apex Zip library for Salesforce.com
License: MIT License
Native Apex Zip library for Salesforce.com
License: MIT License
I am getting CPU time limit exceeded error when i am try to getFile in a loop.
sampleZip = new Zippex(EncodingUtil.base64Decode(/*Some zip file*/));
sFileNames = sampleZip.getFileNames();
for(String fileName : sFileNames){
if(fileName.endsWith('.xml')==false){
Blob myBlob = sampleZip.getFile(fileName);
if(String.isBlank(myBlob.toString())){
containedFileNames.add(fileName);
}
}
}
During testing through the developer console. I got below error.
please help
System.StringException: Starting position out of bounds: 201590400
--
I tried to use this way to download attachment, I meet a heap size limit. because of the large file.
I know this will be a 'noob' question since I am new to SF and trying to get these doc and docx converted from the stream, but SF is making me and my office break conventions that we used (which is fine) and I don't want to waste hours of time saving the files as .cls when they should be apex if that is what is meant.
The zippex class fails with Apex CPU time limit exceeded when the data is bulk in nature. For me the class failed when the data volume >= 5000
Could you implement a copy method file from one zip to another.
For example:
I have zip metadata from salesforce, I would like to save each file in a separate attachment. When we use getFile() we convert it to Blob then then back to zip. And I get the 'CPU LIMIT TIMEOUT' error, but if there was a copy option, I think it would work.
Thanks!
Or am I missing something?
I have taken two strings and added to Zippex class instance using add file and inserted the attachment into salesforce using getZipArchive(). When i load the attachment into apex and use toString() it throws an error saying it's not a valid UTF-8 String. What should be done to prevent this error.
This is very interesting indeed! Have you done any analysis on the impact it has on the Apex CPU Governor?
I was hoping to find a deflate (https://en.wikipedia.org/wiki/Deflate) implementation in this lib. For encoding of PlantUML diagrams as described here https://plantuml.com/de/text-encoding.
Is it there?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.