1. A method of video encoding, the method comprising: when an offset corresponding to a band is applied to at least one pixel of a current block to perform pixel value compensation, determining information about compensation type of the current block to indicate a band type; when an offset corresponding to an edge pattern is applied to at least one pixel of the current block to perform the pixel value compensation, determining the information about compensation type of the current block to indicate an edge type; and generating a bitstream including the information about compensation type of the current block and the offset, wherein the band is one of a plurality of bands, and the edge pattern is one of a plurality of edge patterns.