A method for generating a difference between old and new versions of data for updating software in a difference generation device , comprising: parsing old and new versions of software data, wherein the software data is divided into different partition according to a program, a kernel, or a file system and the software data in a partition is divided into different blocks, and extracting information for partitions and blocks of the old and new versions of the software data; identifying (S215) number of the partitions and sizes of the blocks from the extracted information; comparing (S230) sizes of the blocks in each of the partitions identified from the extracted information for the partitions and blocks with an available memory size, wherein if the available memory size is not enough in size to process the block, the block size is reduced until the available memory size is sufficient to process the block; determining whether the remaining size of the corresponding partition of new version of software data is larger than the block size; determining (S235) the block size as an optimal block size, when the remaining size of new version of the software data is larger than the block size, and determining (S240) the remaining size of new version of the software data as the optimal block size, when the remaining size of new version of the software data is smaller than or equal to the block size; and generating (S250) the difference between the old and new versions of the software data for the blocks comprised in each of the partitions, based on the optimal block size; wherein generating the difference comprises: determining one of Equal, Insert, or Mod by comparing data streams for the old and new versions of the software data in each of the blocks, and generating the difference by listing differential data streams comprising the determined one of Equal, Insert, and Mod. parsing old and new versions of software data, wherein the software data is divided into different partition according to a program, a kernel, or a file system and the software data in a partition is divided into different blocks, and extracting information for partitions and blocks of the old and new versions of the software data; identifying (S215) number of the partitions and sizes of the blocks from the extracted information; comparing (S230) sizes of the blocks in each of the partitions identified from the extracted information for the partitions and blocks with an available memory size, wherein if the available memory size is not enough in size to process the block, the block size is reduced until the available memory size is sufficient to process the block; determining whether the remaining size of the corresponding partition of new version of software data is larger than the block size; determining (S235) the block size as an optimal block size, when the remaining size of new version of the software data is larger than the block size, and determining (S240) the remaining size of new version of the software data as the optimal block size, when the remaining size of new version of the software data is smaller than or equal to the block size; and generating (S250) the difference between the old and new versions of the software data for the blocks comprised in each of the partitions, based on the optimal block size; wherein generating the difference comprises: determining one of Equal, Insert, or Mod by comparing data streams for the old and new versions of the software data in each of the blocks, and generating the difference by listing differential data streams comprising the determined one of Equal, Insert, and Mod. <EOS>