Storage of PM Data
[nonrtric.git] / pmlog / src / main / java / org / oran / pmlog / KafkaTopicListener.java
index b5d2dae..390ccae 100644 (file)
 
 package org.oran.pmlog;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.zip.GZIPInputStream;
 
 import org.apache.kafka.clients.consumer.ConsumerConfig;
 import org.apache.kafka.common.serialization.ByteArrayDeserializer;
@@ -97,20 +94,4 @@ public class KafkaTopicListener {
                 .subscription(Collections.singleton(this.applicationConfig.getKafkaInputTopic()));
     }
 
-    public static byte[] unzip(byte[] bytes) throws IOException {
-        try (final GZIPInputStream gzipInput = new GZIPInputStream(new ByteArrayInputStream(bytes))) {
-            return gzipInput.readAllBytes();
-        }
-    }
-
-    private static byte[] unzip(byte[] bytes, String fileName) {
-        try {
-            return fileName.endsWith(".gz") ? unzip(bytes) : bytes;
-        } catch (IOException e) {
-            logger.error("Error while decompression, file: {}, reason: {}", fileName, e.getMessage());
-            return new byte[0];
-        }
-
-    }
-
 }