Index: /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POIList.java
===================================================================
--- /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POIList.java (revision 746)
+++ /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POIList.java (revision 748)
@@ -1,3 +1,15 @@
 package gr.ntua.ece.cslab.modissense.dataoriented.containers;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+
 
 /**
@@ -6,9 +18,34 @@
  *
  */
-public class POIList implements Serializable {
+public class POIList implements Serializable, Compressible {
+	
+	private static final int COMPRESSION_LEVEL = 4;
+	private List<POI> poiList;
+	
+	public POIList() {
+		this.poiList = new LinkedList<POI>();
+	}
+	
+	public void addPOI(POI poi){
+		this.poiList.add(poi);
+	}
+	
+	public List<POI> getPOIs() {
+		return this.poiList;
+	}
 
 	@Override
 	public void parseBytes(byte[] bytes) {
-		// TODO Auto-generated method stub
+		ByteBuffer buffer = ByteBuffer.wrap(bytes);
+		this.poiList = new LinkedList<POI>();
+		int sizeOfList = buffer.getInt();
+		for(int i=0;i<sizeOfList;i++) {
+			int byteSize = buffer.getInt();
+			byte[] poiSerial = new byte[byteSize];
+			buffer.get(poiSerial, 0, byteSize);
+			POI poi = new POI();
+			poi.parseBytes(poiSerial);
+			this.poiList.add(poi);
+		}
 
 	}
@@ -16,7 +53,116 @@
 	@Override
 	public byte[] getBytes() {
-		// TODO Auto-generated method stub
-		return null;
+		int numberOfBytes = 	Integer.SIZE/8;		// number of POIs stored
+		for(POI p : this.poiList) {
+			numberOfBytes+=Integer.SIZE/8;
+			numberOfBytes+=p.getBytes().length;
+		}
+		
+		byte[] bytes = new byte[numberOfBytes];
+		ByteBuffer buffer = ByteBuffer.wrap(bytes);
+		
+		buffer.putInt(this.poiList.size());
+		for(POI p: this.poiList) {
+			byte[] bytesPoi = p.getBytes();
+			buffer.putInt(bytesPoi.length);
+			buffer.put(bytesPoi);
+		}
+		return bytes;
+	}
+	
+	@Override
+	public byte[] getCompressedBytes() {
+		byte[] serialization = this.getBytes();
+		
+		Deflater deflater = new Deflater();
+		deflater.setLevel(COMPRESSION_LEVEL);
+		deflater.setInput(serialization);
+		
+		ByteArrayOutputStream stream  = new ByteArrayOutputStream();
+		byte[] buffer = new byte[1024];
+		deflater.finish();
+		while(!deflater.finished()) {
+			int count = deflater.deflate(buffer);
+			stream.write(buffer, 0, count);
+		}
+		try {
+			stream.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		
+		byte[] result = stream.toByteArray();
+		return result;
 	}
 
+	@Override
+	public void parseCompressedBytes(byte[] array) {
+		Inflater inflater = new Inflater();
+		inflater.setInput(array);
+		
+		ByteArrayOutputStream stream  = new ByteArrayOutputStream();
+		byte[] buffer = new byte[1024];
+		while(!inflater.finished()){
+			int count = 0;
+			try {
+				count = inflater.inflate(buffer);
+			} catch (DataFormatException e) {
+				e.printStackTrace();
+			}
+			stream.write(buffer, 0, count);
+		}
+		try {
+			stream.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		byte[] decompressed= stream.toByteArray();
+		
+		this.parseBytes(decompressed);
+		
+	}
+	
+	@Override
+	public String toString() {
+		return this.poiList.toString();
+	}
+	
+	public static void main(String[] args) throws IOException, DataFormatException {
+		POI a,b;
+		Set<String> keywords1 = new HashSet<String>(), keywords2 = new HashSet<String>();
+		keywords1.add("wine");
+		keywords1.add("bar");
+		keywords2.add("italian");
+		keywords2.add("food");
+		
+		a = new POI();
+		a.setName("Foobara+Foomara");
+		a.setX(50.0);
+		a.setY(51.0);
+		a.setScore(12.1);
+		a.setKeywords(keywords1);
+		
+		b = new POI();
+		b.setName("HelloWorld");
+		b.setX(51.0);
+		b.setY(12.2);
+		b.setScore(9.1);
+		b.setKeywords(keywords2);
+		
+		POIList list = new POIList();
+		list.addPOI(a);
+		list.addPOI(b);
+		for(int i=0;i<100;i++) {
+			list.addPOI(b);
+		}
+		
+		System.out.println("List consists of:\t"+list.getPOIs().size());
+		
+		POIList newList = new POIList();
+		newList.parseCompressedBytes(list.getCompressedBytes());
+		System.out.println("New list consists of:\t"+newList.getPOIs().size());
+	}
+
+	
+
 }
Index: /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/Compressible.java
===================================================================
--- /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/Compressible.java (revision 748)
+++ /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/Compressible.java (revision 748)
@@ -0,0 +1,8 @@
+package gr.ntua.ece.cslab.modissense.dataoriented.containers;
+
+public interface Compressible {
+
+	public byte[] getCompressedBytes();
+	
+	public void parseCompressedBytes(byte[] array);
+}
Index: /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POI.java
===================================================================
--- /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POI.java (revision 746)
+++ /query-answering/src/main/java/gr/ntua/ece/cslab/modissense/dataoriented/containers/POI.java (revision 748)
@@ -99,7 +99,5 @@
 							+ Integer.SIZE/8;					// size of set
 		for(String s:keywords)									// string size + actual string for all keywords
-			totalSize+=s.length() + s.length();
-		System.out.println("total size\t"+totalSize);
-		
+			totalSize+=Integer.SIZE/8 + s.length();
 		byte[] serializable = new byte[totalSize];
 		
@@ -125,4 +123,5 @@
 		poi.setX(10.2);
 		poi.setY(10.3);
+		poi.setScore(55.0);
 		Set<String> keyws = new HashSet<String>();
 		keyws.add("beer");
