{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
BerSequenceGenerator sGen = new BerSequenceGenerator(bOut);
sGen.addObject(new Asn1ObjectIdentifier(CMSObjectIdentifiers.compressedData.getId()));
BerSequenceGenerator cGen = new BerSequenceGenerator(sGen.getRawOutputStream(), 0, true);
cGen.addObject(new Asn1Integer(0));
//
// AlgorithmIdentifier
//
DerSequenceGenerator algGen = new DerSequenceGenerator(cGen.getRawOutputStream());
algGen.addObject(new Asn1ObjectIdentifier("1.2"));
algGen.close();
//
// Encapsulated ContentInfo
//
BerSequenceGenerator eiGen = new BerSequenceGenerator(cGen.getRawOutputStream());
eiGen.addObject(new Asn1ObjectIdentifier("1.1"));
BerOctetStringGenerator octGen = new BerOctetStringGenerator(eiGen.getRawOutputStream(), 0, true);
//
// output containing zeroes