A method for encoding transform coefficients, comprising: encoding transform coefficients of a transform coefficient block with a size of 8x8 or 32x32 according to a predetermined scan order by which a set number of transform coefficients in each group is encoded until a last group of the transform coefficient block is encoded; storing an obtained map of non-zero transform coefficients, absolute values of transform coefficients, and positive and negative signs of non-zero transform coefficients; and when the last group is being encoded, after obtaining a map of non-zero transform coefficients encoded in the last group, writing the stored map of non-zero transform coefficients and the map of non-zero transform coefficients encoded in the last group into a bit stream; after obtaining absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients encoded in the last group, writing the stored absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients and the absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients encoded in the last group into the bit stream, wherein the set number is 16, and wherein the transform coefficient block is composed of sub-blocks which are sequentially encoded and each of the sub-blocks is of a size of 4x4 and contains a 4x4 group of transform coefficients; the predetermined scan orders used to obtain the map of non-zero transform coefficients, absolute values of transform coefficients, and positive and negative signs of non-zero transform coefficients, in each group of transform coefficients of the transform coefficients blocks, are the same; wherein the encoding transform coefficients of a transform coefficient block, and encoding a set number of transform coefficients in each group comprise: encoding a map of non-zero transform coefficients of the predetermined number of transform coefficients, encoding a map of transform coefficients greater than 1 of the set number of transform coefficients, encoding absolute values of transform coefficients greater than 1 of the set number of transform coefficients, and encoding positive and negative signs of non-zero transform coefficients of a set number of transform coefficients. encoding transform coefficients of a transform coefficient block with a size of 8x8 or 32x32 according to a predetermined scan order by which a set number of transform coefficients in each group is encoded until a last group of the transform coefficient block is encoded; storing an obtained map of non-zero transform coefficients, absolute values of transform coefficients, and positive and negative signs of non-zero transform coefficients; and when the last group is being encoded, after obtaining a map of non-zero transform coefficients encoded in the last group, writing the stored map of non-zero transform coefficients and the map of non-zero transform coefficients encoded in the last group into a bit stream; after obtaining absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients encoded in the last group, writing the stored absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients and the absolute values of transform coefficients and positive and negative signs of non-zero transform coefficients encoded in the last group into the bit stream, wherein the set number is 16, and wherein the transform coefficient block is composed of sub-blocks which are sequentially encoded and each of the sub-blocks is of a size of 4x4 and contains a 4x4 group of transform coefficients; the predetermined scan orders used to obtain the map of non-zero transform coefficients, absolute values of transform coefficients, and positive and negative signs of non-zero transform coefficients, in each group of transform coefficients of the transform coefficients blocks, are the same; wherein the encoding transform coefficients of a transform coefficient block, and encoding a set number of transform coefficients in each group comprise: encoding a map of non-zero transform coefficients of the predetermined number of transform coefficients, encoding a map of transform coefficients greater than 1 of the set number of transform coefficients, encoding absolute values of transform coefficients greater than 1 of the set number of transform coefficients, and encoding positive and negative signs of non-zero transform coefficients of a set number of transform coefficients.