[Desire 820 General] canaughtor:
Finally after giving the command to flash, this is the output I get:

naught@Canaughtor:~$ sudo fastboot flash zip firmware.zip

target reported max download size of 16777216 bytes

Invalid sparse file format at header magi

error: write_sparse_skip_chunk: don't care size 1376855784 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1360082664 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1343309544 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1326536424 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1309763304 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1292990184 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1276217064 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1259443944 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1242670824 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1225897704 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1209124584 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1192351464 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1175578344 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1158805224 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1142032104 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1125258984 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1108485864 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1091712744 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1074939624 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1058166504 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1041393384 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1024620264 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 1007847144 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 991074024 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 974300904 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 957527784 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 940754664 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 923981544 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 907208424 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 890435304 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 873662184 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 856889064 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 840115944 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 823342824 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 806569704 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 789796584 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 773023464 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 756250344 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 739477224 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 722704104 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 705930984 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 689157864 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 672384744 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 655611624 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 638838504 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 622065384 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 605292264 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 588519144 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 571746024 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 554972904 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 538199784 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 521426664 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 504653544 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 487880424 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 471107304 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 454334184 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 437561064 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 420787944 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 404014824 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 387241704 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 370468584 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 353695464 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 336922344 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 320149224 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 303376104 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 286602984 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 269829864 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 253056744 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 236283624 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 219510504 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 202737384 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 185964264 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 169191144 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 152418024 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 135644904 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 117626600 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 100853480 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 84018920 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 67245800 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 50472680 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 33642216 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 16869096 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 95976 is not a multiple of the block size 4096

fastboot: ../libsparse/sparse.c:144: write_all_blocks: Assertion `pad >= 0' failed.

Aborted (core dumped)

Please help me.