MCPcopy Create free account
hub / github.com/LUX-Core/lux / GzipFile

Function GzipFile

src/cryptopp/test.cpp:756–786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754}
755
756void GzipFile(const char *in, const char *out, int deflate_level)
757{
758// FileSource(in, true, new Gzip(new FileSink(out), deflate_level));
759
760 // use a filter graph to compare decompressed data with original
761 //
762 // Source ----> Gzip ------> Sink
763 // \ |
764 // \ Gunzip
765 // \ |
766 // \ v
767 // > ComparisonFilter
768
769 EqualityComparisonFilter comparison;
770
771 Gunzip gunzip(new ChannelSwitch(comparison, "0"));
772 gunzip.SetAutoSignalPropagation(0);
773
774 FileSink sink(out);
775
776 ChannelSwitch *cs;
777 Gzip gzip(cs = new ChannelSwitch(sink), deflate_level);
778 cs->AddDefaultRoute(gunzip);
779
780 cs = new ChannelSwitch(gzip);
781 cs->AddDefaultRoute(comparison, "1");
782 FileSource source(in, true, cs);
783
784 comparison.ChannelMessageSeriesEnd("0");
785 comparison.ChannelMessageSeriesEnd("1");
786}
787
788void GunzipFile(const char *in, const char *out)
789{

Callers 1

CRYPTOPP_API mainFunction · 0.85

Calls 3

AddDefaultRouteMethod · 0.80

Tested by

no test coverage detected