Jason Segal is a revelation in “The End of the Tour” as author David Foster Wallace, who achieved phenomenal literary fame by writing a complex, densely annotated novel that was as compelling and entertaining as it was long (more than 1,000 pages). His fame only grew with his image, of a scruffy yet brilliant guy in a bandana, and was ultimately, tragically cemented when he hung himself in 2008.

Wallace did so a moment before many of the things he wrote about so presciently became true. His magnum opus, “Infinite Jest,” imagines technology that allows people to see each other when they talk on the phone, leading to a vast market for in-home sets and costumes to improve your appearance over the phone. Another of the countless story lines involves the search for a film so seductively entertaining that it kills you. It’s also about tennis, addiction, America and lots of drugs.

The point is that in his work Wallace was devoted to ideas of portrayal, fame, loneliness and authenticity. When you now watch him portrayed in a film, discussing these very ideas, by one of the most successful comedians working today, another layer folds into the story. “The End of the Tour” is based on a book based on a series of interviews conducted at the end of his tour for “Infinite Jest,” for a Rolling Stone magazine story that wasn’t published or even written at the time.

From these scraps, then, it is appropriate that a major narrative structure is not really tacked onto the material. Basically, another male writer, David Lipsky (Jesse Eisenberg), flies out to Wallace’s home and spends a few days with him, recording their conversations. Even if you forget you’re watching a recreation of one of our most important writers and, ostensibly, a look inside his life, the film still functions on an interesting level, on the competitive dance between the two guys.

This photo provided by courtesy of the Sundance Film Institute shows, Jesse Eisenberg, left as David Lipsky, and Jason Segel, as David Foster Wallace, in a scene from the film, "The End of the Tour," directed by James Ponsoldt. The movie premieres at the 2015 Sundance Film Festival on Friday, Jan. 23, 2015. (AP Photo/Sundance Film Institute, Jakob Ihre)

This photo provided by courtesy of the Sundance Film Institute shows, Jesse Eisenberg, left as David Lipsky, and Jason Segel, as David Foster Wallace, in a scene from the film, “The End of the Tour.” (AP Photo/Sundance Film Institute, Jakob Ihre)

They go back and forth between an awkward, forced friendship as one David tries to ingratiate himself to his subject, to a genuine rapport, to arguments. Their professional and sexual competitiveness ebbs and flows. The guys discuss writing and fame, but also girls, fast food and television. The film doesn’t really draw conclusions or pass judgment; it merely records two talented actors portraying fascinating people.

Segal’s performance goes far beyond a physical similarity to David Foster Wallace, which is kind of cheating anyway since you can pretty much slap a bandana on anyone tall and you’re halfway there. I appreciated a scene in which Lipsky challenges Wallace on the subject of the bandana; Wallace claims to be shocked that anyone even thinks about that and both Lipsky and the viewer find it hard to believe.

“The End of the Tour” is a deceptively simple concept that anyone with an interest in Wallace must see. But even for non-fans, it’s a well-executed character study that also depicts an interesting behind-the-scenes look into the journalistic process. And it is impossible not to be moved when you hear Segal as the doomed Wallace bitterly discussing his past suicide attempts and the ways in which he continues to try, through writing, to conceive of a way of life that is bearable for him. To know that, ultimately, he could not do so is absolutely heartbreaking, especially when, as David Lipsky states in the film’s final scenes, his work has done and will do that for so many other people.

“The End of the Tour” is playing at the Crescent Theater through Aug. 27.