Index: code/branches/FICN/src/network/GameStateManager.cc
===================================================================
--- code/branches/FICN/src/network/GameStateManager.cc	(revision 401)
+++ code/branches/FICN/src/network/GameStateManager.cc	(revision 403)
@@ -168,5 +168,5 @@
 
 GameState GameStateManager::compress(GameState a){
-  // to be implemented !!!!!!!!!!!!!!
+  a.
   return a;
 }
Index: code/branches/FICN/src/network/GameStateManager.h
===================================================================
--- code/branches/FICN/src/network/GameStateManager.h	(revision 401)
+++ code/branches/FICN/src/network/GameStateManager.h	(revision 403)
@@ -29,4 +29,17 @@
   unsigned char *data;
 };
+
+/**
+ * this struct defines a gamestate:
+ * compsize is the size of the compressed data
+ * normsize is the size of the uncompressed data
+ * data are the gamestates
+ */
+  struct GameStateCompressed{
+	int id; 
+	int compsize;
+	int normsize;
+	unsigned char *data;
+  };
 
 /**
Index: code/branches/FICN/src/network/PacketDecoder.cc
===================================================================
--- code/branches/FICN/src/network/PacketDecoder.cc	(revision 401)
+++ code/branches/FICN/src/network/PacketDecoder.cc	(revision 403)
@@ -110,20 +110,22 @@
 void PacketDecoder::gstate( ENetPacket* packet )
 {
-	GameState* currentState = new GameState;
+	GameStateCompressed* currentState = new GameStateCompressed;
 	//since it's not alowed to use void* for pointer arithmetic
 	unsigned char* data = (unsigned char*)packet->data;
-	//copy the gamestate id into the struct, which is located at second place data+sizeof( int )
+	//copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
 	memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
-	//copy the size of the gamestate data into the new gamestate struct, located at 3th
+	//copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
 	//position of the data stream, data+2*sizeof( int )
-	memcpy( (void*)&(currentState->size), (const void*)(data+2*sizeof( int )), sizeof( int) );
+	memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) );
+	//size of uncompressed data
+	memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
 	//since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
 	currentState->data = (unsigned char*)(malloc( currentState->size ));
-	//copy the gamestate data
-	memcpy( (void*)(currentState->data), (const void*)(data+3*sizeof( int )), currentState->size );
+	//copy the GameStateCompressed data
+	memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int )), currentState->compsize );
   
 	//clean memory
 	enet_packet_destroy( packet );
-  //run processGamestate
+  //run processGameStateCompressed
   //TODO: not yet implemented!
   //processGamestate(currentState);
@@ -181,8 +183,8 @@
 }
 
-void PacketDecoder::printGamestate( GameState* data )
+void PacketDecoder::printGamestate( GameStateCompressed* data )
 {
-	cout << "id of gamestate:   " << data->id << endl;
-	cout << "size of gamestate: " << data->size << endl;
+	cout << "id of GameStateCompressed:   " << data->id << endl;
+	cout << "size of GameStateCompressed: " << data->size << endl;
 }
 
Index: code/branches/FICN/src/network/PacketGenerator.cc
===================================================================
--- code/branches/FICN/src/network/PacketGenerator.cc	(revision 401)
+++ code/branches/FICN/src/network/PacketGenerator.cc	(revision 403)
@@ -70,5 +70,5 @@
 
 /*### gamestate packet */
-ENetPacket* PacketGenerator::gstate( GameState* states, int reliable )
+ENetPacket* PacketGenerator::gstate( GameStateCompressed* states, int reliable )
 {
 	int* gid; *gid = GAMESTATE; //first assign the correct enet id
@@ -76,9 +76,11 @@
 	unsigned char* data = (unsigned char*)malloc( totalLen ); //allocate the memory for datastream
 	memcpy( (void*)(data), (const void*)gid, sizeof( int ) ); //this is the enet id
-	memcpy( (void*)(data+sizeof(int)), (const void*)&(states->id), sizeof(int) ); //the gamestate id
-	//this is the size of the gamestate data, place at 3th position of the enet datastream
-	memcpy( (void*)(data+2*sizeof(int)), (const void*)&(states->size), sizeof(int)); 
-	//place the gamestate data at the end of the enet datastream
-	memcpy( (void*)(data+3*sizeof( int )), (const void*)states->data, states->size );
+	memcpy( (void*)(data+sizeof(int)), (const void*)&(states->id), sizeof(int) ); //the GameStateCompressed id
+	//this is the compressed size of the GameStateCompressed data, place at 3th position of the enet datastream
+	memcpy( (void*)(data+2*sizeof(int)), (const void*)&(states->compsize), sizeof(int));
+	//this is the uncompressed size of GameStateCompressed data
+	memcpy( (void*)(data+3*sizeof(int)), (const void*)&(states->normsize), sizeof(int));
+	//place the GameStateCompressed data at the end of the enet datastream
+	memcpy( (void*)(data+4*sizeof( int )), (const void*)states->data, states->compsize );
 	//create an enet packet with the generated bytestream
 	ENetPacket *packet = enet_packet_create( data , totalLen, reliable );
Index: code/branches/FICN/src/network/PacketManager.h
===================================================================
--- code/branches/FICN/src/network/PacketManager.h	(revision 401)
+++ code/branches/FICN/src/network/PacketManager.h	(revision 403)
@@ -15,5 +15,5 @@
 	CHAT,
 	GAMESTATE ,
-        CLASSID
+    CLASSID
 };
 
@@ -102,5 +102,5 @@
 	void chatMessage( ENetPacket* packet );
 	void gstate( ENetPacket* packet );
-        void clid( ENetPacket *packet);
+    void clid( ENetPacket *packet);
 	
   //process data
@@ -117,5 +117,5 @@
 	void printChat( chat* data );
 	void printGamestate( GameState* data );
-        void printClassid( classid *cid);
+    void printClassid( classid *cid);
 };
 }
