 			  d_byteCompressedData[d_compressedDataOffset[j] + k] = d_huffmanDictionary_shared.bitSequence[d_inputFileData[j]][k];
 		  }
 	  }
+		__syncthreads();
   }
 
 	//beyond overflow

			  d_byteCompressedData_overflow[d_compressedDataOffset[j] + k] = d_huffmanDictionary_shared.bitSequence[d_inputFileData[j]][k];
		  }
	  }
  }
	__syncthreads();
}

/*---------------------------------------------------------------------------------------------------------------------------------------------*/

	  }
		__syncthreads();
  }
}

/*---------------------------------------------------------------------------------------------------------------------------------------------*/
// single run and no overflow
/*---------------------------------------------------------------------------------------------------------------------------------------------*/
//compress
__global__ void compress_single_run_no_overflow(unsigned char *d_inputFileData, unsigned int *d_compressedDataOffset, unsigned char *d_byteCompressedData, unsigned int inputFileLength){
	unsigned int pos = blockIdx.x * blockDim.x + threadIdx.x;
	unsigned int upperLimit = d_compressedDataOffset[inputFileLength];
