GitHub Copilot is much more effective than ChatGPT for writing code, asking the same thing on writing decoder, one does a read function for headers while the other one does a write function, definitely in the wrong for ChatGPT.