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

File or folder compression in AEM

  • March 21, 2016
  • 4 replies
  • 3698 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

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.

Monendra_Singh
New Participant
March 22, 2016

Thanks Jörg for the confirmation.

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

kautuk_sahni
kautuk_sahniAccepted solution
Employee
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
joerghoh
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