Building the codec.