made the decomp func to accept the blocks of the img and save in the training func the blocks to another file