WOODY ALLEN'S new comedy, "Zelig," which opens at the Avalon 1 this Wednesday, is the most beautifully conceived and realized movie Allen has created. It's as clever and incisive as his best humorous sketches, but it also shows masterful control of an inventive form of exposition and a complicated system of illusion.

When "Zelig" failed to make a tentative release date last fall, the usual rumors circulated that it must be yet another picture "in trouble." Utter nonsense. Once you see what Allen was striving for and understand the technical obstacles that needed to be hurdled, you feel profoundly grateful for every painstaking moment lavished on the production.

"Zelig" provokes the first of many delightful double takes with the legend that follows the title card: "This documentary is dedicated to . . ." it begins. This what? is one's natural response, but the movie that ensues does, indeed, sustain a brilliant stylistic hoax. "Zelig" passes itself off as a feature-length documentary, a social history reconstructing the strange case of Leonard Zelig, "an odd little man who kept to himself," a psychiatric freak whose behaviorial vicissitudes kept an avid press and public in recurrent suspense between 1928-33.

In "Zelig" Allen avoids conventional exposition like poison while providing adroit storytelling. He invents an unforgettable new character for himself; he sustains an outrageous comedy plot that renews itself with witty twists and reversals whenever you fear it might be in danger of faltering; and, perhaps the most ingratiating aspect of all, he arranges a wonderful comic love match between himself and Mia Farrow, who gives a radiant performance as Leonard Zelig's gallant analyst, Dr. Eudora Fletcher.

Allen constructs his stylistic breakthrough around the account of a personality breakthrough. The Zelig mystery unfolds under the cover of a documentary. The guiding fiction is that everything we see is nonfiction footage: on one hand, contemporary interviews in color with people who recall or comment upon Zelig's bizarre history; on the other, "archive" material in black-and-white, drawn largely from newsreels or home movies, that allow the case to be pieced together chronologically, like a cinematic jigsaw puzzle. The format itself is not unique, and knowledgable spectators will recognize the influence of the "News on the March" sequence from "Citizen Kane." However, Allen, cinematographer Gordon Willis, designer Mel Bourne, editor Susan Morse and company have gone this distinguished inspiration one better by pretending that the entire movie is a documentary profile.

What does the puzzle reveal? A human chameleon. Emerging from obscurity, Leonard Zelig, the son of an obscure actor in the Yiddish theater "whose performance as Puck in the Orthodox version of 'A Midsummer Night's Dream' was coolly received," startles the world by demonstrating an ability to resemble anyone he stands next to. He literally takes on the appearance of his human surroundings. Up to a point, that is. Zelig's syndrome stops short of transsexual transformations. But in the company of fat men or a kilted Scot or a tribal Indian chief or black siblings, he begins to look like the company he keeps. And talk like them, too, aping not only physical characteristics but attitudes and prejudices.

Upon being detected and taken into custody by perplexed constables, Zelig becomes a Jazz Age celebrity--an object of profound controversy to the medical profession, naturally divided about whether his marvelous affliction is organic or psychological, and an object of profound curiosity to the public at large. A burgeoning pop culture and busy commerce develops around the enigma of Leonard Zelig, whose unnatural state inspires songs, books, toys, souvenirs, a movie biography, even a popular dance craze (the Chameleon, a satiric honey of a novelty step devised by choreographer Danny Daniels).

Fletcher, one of the staff psychiatrists who first encounters Zelig, finds herself more and more preoccupied with the case as Zelig becomes a pawn in the hands of potential exploiters. Reflecting on it in retrospect (the elderly Fletcher is played by Ellen Garrison, a sensitive match for Mia Farrow), she acknowledges that her own motives were dominated by ambition at the outset, but when a twist of fate allows her to treat Zelig as a patient, his plight awakens finer motives. She becomes dedicated to helping him transcend the chameleon state, and in the course of the treatment, patient and physician fall in love.

Plenty of obstacles, both obvious and unforeseen, remain to be surmounted. For example, Fletcher's efforts to cure Zelig's self-effacing tendencies through post-hypnotic suggestion and reverse psychology don't have quite the consequences she anticipated. But events are happily manipulated to reunite the elusive psychotic and his intrepid analyst in circumstances that allow them to save each other's lives and emerge as not only a heavenly match but as national heroes.

While a substantial amount of archive footage is used to authenticate the historical period (the film's researchers drew on the resources of the National Archives and Library of Congress for some of this), most of "Zelig" had to be faked, and it's faked with consistent brilliance. Cinematographer Willis' genius is awesomely imprinted on the texture of "Zelig." The lighting schemes are subtly modulated to resemble newsreel or impromptu shooting conditions; in addition, this footage is artificially "aged," streaked or spotted in apparently random ways.

The black-and-white sequences encompass a fantastic range of evocative effects. The faked material merges so smoothly with genuine archive clips that you're rarely conscious of the substitutions and often delightfully shocked at the discovery you've been transported across time frames without realizing it. When Zelig's identities impinge on historical figures, the editors composite him into shots with stunning effectiveness. It's often a delayed-action comic jolt as well. For example, you're watching a vintage clip of Lou Gehrig at bat during a spring training game and there, all of a sudden, Allen has miraculously materialized in the middle distance, taking practice swings in the on-deck circle. Ultimately, this illusion proves a mere appetizer, preparing the way for a spectacular feat of photographic magicianship in Hitler's Berlin.

Some of the images have a breathtaking emotional mystery and impact. For instance, there's an electrifying moment when Farrow's character, caught in a solitary, contemplative mood by a spying camera, suddenly looks directly at us and exhales a breath of cigarette smoke that merges with wispy strangeness into an overexposed streak on the film. I don't know why this image is such a chiller, but God knows it is. Willis reserves one of the greatest compositions I've ever witnessed for the fadeout, and Allen's timing, as he performs a clinching expressive gesture before he and Farrow exit the frame together, is a discreet sensation. Chaplin padding down those long roads was pretty eternal, but the combination of angle, light and pantomime that closes "Zelig" gives a modern spectator something equally beautiful and eternal to contemplate.

It's amazing how much incidental playfulness this form of fakery accommodates--and staggering to consider the difficulties it must have posed for the production itself. The movie is full of comic riffs calculated to resemble the briefest of documentary inserts, like the dance interludes illustrating the Chameleon craze or a quick sight gag that shows several doctors monitoring Zelig's heartbeat through a communal stethoscope. Among other appealing features, "Zelig" turns into a treasure trove of funny throwaways, and perhaps the funniest is a newsreel interview with Fletcher's mother, a hilariously uncooperative subject in the person of Jean Trowbridge.

The contemporary interviews are dominated by literary intellectuals--Susan Sontag, Irving Howe, Saul Bellow, Bruno Bettelheim and John Morton Blum--whom Allen has persuaded to "comment" on the Zelig case. He's treated them with admirable humorous courtesy, putting words in their mouths that sound reasonably characteristic, the way they might be expected to interpret a freak like Zelig if there really had been a freak like Zelig. Sontag, for instance, celebrates his life as a victory of the esthetic, intuitive side of human nature, while Howe emphasizes the exaggerated need to conform and assimilate in this second-generation American Jew. Allen's respect for these writers is evidently so sincere that he betrays not the slightest tendency to kid them. There is a sneaky element of humor in these sequences, but it doesn't have the guests as its target. The thought does inevitably cross your mind that Allen is having a bit of fun at the expense of Warren Beatty's documentary inserts in "Reds." At least it's fun to think so.

The movie never loses its comic verve, but it may disappoint spectators who crave a kick-in-the-pants entertainment. In the long run "Zelig" is far more touching than side-splitting. One's perception of Zelig's condition deepens as the story unfolds, and the absurdity of it has a benevolent psychological payoff, the revelation that Zelig doesn't so much cure his craziness as get it under control and make it work for him when the chips are down. Saul Bellow gets the observation that sums up the idea: "In a funny kind of way his sickness was at the root of his salvation."

This concept has a special measure of both humor and pathos when embodied by Woody Allen. Zelig allows him to rejuvenate a number of familiar, and perhaps overfamiliar, Allen identities--the frustrated amorist, the perpetual analysand, the pseudo-intellectual--by incorporating them into a mock-historical figure. Far from being too knowing and self-conscious for his own good, Zelig is too ignorant and self-effacing. A man with so little sense of self that he feels compelled to imitate everyone else, Zelig is liberated by an identity that ultimately suits him and belongs to him. While the character obviously springs from the personality and imagination of Woody Allen, it's sufficiently divorced from his own image to give him some acting freedom again.

Disguised behind Fletcher's rimless specs, schoolgirl braids and shy personality, Mia Farrow is also an inspired chameleon, a Sleeping Beauty who experiences a passionate awakening. It takes a lost soul like Zelig to bring out the latent heroism in her character, and this transformation proves doubly satisfying, since it reveals Farrow as an imposing comic consort for Woody Allen.

"Zelig," a sublime comic parable about the quest for identity, vaults Allen back to the creative summit of his profession after a couple of misbegotten endeavors, "Stardust Memories" and "A Midsummer Night's Sex Comedy." Part of the exhilaration of the movie derives from the recognition that a favorite comic artist is back on the beam.