Unlike JPEGs, GIFs do not allow you to control compression directly. But happily, a GIF can adjust its size automatically to fit into the smallest possible space, given a specific number of colors in an image. Once the topic turns to color depth, most discussions of graphics optimization switch from English to GeekSpeak. There's a lot of wasted space in most GIF images. By default, GIFs assume that an image has 256 unique colors.
Many more images look just as good when rendered with fewer colors.
When you force a GIF to render with a smaller number of colors, the overall size of the graphic is automatically reduced. So, for example, dropping a GIF from 256 colors to 129 colors won't shrink the size of the image file at all . But dropping it from 129 colors to 128 will almost always yield impressive savings in file size. If you know why this is true, then the explanation is unnecessary. If you're not sure why it's true, then the explanation is unimportant.