File or folder compression in AEM | Community
Skip to main content
Monendra_Singh
Level 3
March 21, 2016
Solved

File or folder compression in AEM

  • March 21, 2016
  • 4 replies
  • 3704 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

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

4 replies

joerghoh
Adobe Employee
Adobe Employee
March 21, 2016

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

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
March 22, 2016

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
Monendra_Singh
Level 3
March 22, 2016

Thanks Jörg for the confirmation.

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

Adobe Employee
October 17, 2018

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.