A variable length decoding section extracts a codeword and an additional bit
or
bits corresponding to the codeword from compressed image data based on a code table.
An embedding section embeds watermark information in a prescribed bit of the additional
bits extracted by the variable length decoding section. A data connecting section
connects the additional bits having the watermark information embedded therein
by the embedding section with the codeword extracted by the variable length decoding
section to produce a variable length code.