As far as I know, one should use pli and plej for render comparative and superlative in Esperanto. So :
- longer : pli longa
- longest : plej longa
Now, following this comment, I wonder if -eg- can also be used to create superlative from the root.
I don't think so, to my mind longega means tre longa (very long), rather than longest ("most long"). But I would like to be more confident about that.
Also, if I'm wrong, then I would like to know if there is a comparative affix, even an non-official one, equivalent to the English suffix -er for short words. So longer ("more long") could also be translated long▢▢a beside pli longa.