Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

File or folder compression in AEM

Avatar

Level 4

Hi all,

I have created a service which navigates through my product nodes and gets all required properties. It stores all the data in json file under "/content/my-project/data" folder as mydata.json.

The generated file size is around 5 MB. Can I do some kind of optimization/compression which can reduce the size of the file? May be "/content/my-project/data" folder compression.

Is there any api or OOTB feature which I can leverage? Any help will be much appreciated.

Thanks

Monendra

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

As mentioned by Jorg, there is no OOTB to achieve the needful.

You need to write your Component/Service to compress it and uncompress it when needed.

Link:- http://stackoverflow.com/questions/9324933/what-is-a-good-java-library-to-zip-unzip-files

// What is a good Java library to compress files?

Link:- http://stackoverflow.com/questions/4773778/creating-zip-archive-in-java

//Creating Zip archive in JAVA

Link:- https://helpx.adobe.com/experience-manager/using/aem-first-components.html

//Creating your first AEM component.

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-cq-component-uses.html

// Creating a custom CQ component that uses a dialog grid

 

I hope this would be helpful.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

4 Replies

Avatar

Employee Advisor

Hi,

there is no ootb possibility to compress any kind of binary attached to a node. I think that you need to design and implement this on your own.

kind regards,
Jörg

Avatar

Correct answer by
Administrator

Hi

As mentioned by Jorg, there is no OOTB to achieve the needful.

You need to write your Component/Service to compress it and uncompress it when needed.

Link:- http://stackoverflow.com/questions/9324933/what-is-a-good-java-library-to-zip-unzip-files

// What is a good Java library to compress files?

Link:- http://stackoverflow.com/questions/4773778/creating-zip-archive-in-java

//Creating Zip archive in JAVA

Link:- https://helpx.adobe.com/experience-manager/using/aem-first-components.html

//Creating your first AEM component.

Link:- https://helpx.adobe.com/experience-manager/using/creating-custom-cq-component-uses.html

// Creating a custom CQ component that uses a dialog grid

 

I hope this would be helpful.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 4

Thanks Jörg for the confirmation.

Thanks a lot Sahni for providing useful links, I will try to utilize it.

Avatar

Level 2

I was also having a similar use-case where I have to zip a few files under DAM assets so I was looking some online OOTB/Blog and I found link https://helpx.adobe.com/experience-manager/using/downloading-dam-assets.html. Thought to update it here.