Louise Brooks, 78, the American starlet who attained a special measure of film immortality in two famous German pictures of the late 1920s, "Pandora's Box" and "Diary of a Lost Girl," and emerged from obscurity a generation later as a distinctively witty, outspoken and often acerbic memoirist, died yesterday of a heart attack at her home in Rochester, N.Y. She had suffered for many years from arthritis and emphysema.

Since 1960, Miss Brooks had rarely left her Rochester apartment, consenting only to occasional interviews and contributing occasional articles to highbrow film journals. The most recent and notable of the interviews was conducted by Kenneth Tynan, who made her the subject of an admiring New Yorker magazine profile, "The Girl in the Black Helmet." It was published in 1979 and included in his book "Show People."

A selection of Miss Brooks' pungent reminiscences and commentaries on a sadly abbreviated yet memorably checkered career were published in 1982 under the title "Lulu in Hollywood."

A slim, graceful, dark-eyed beauty who embodied the pertly provocative flapper looks and attitudes of the 1920s, Miss Brooks presented the silent movie camera with pale, finely chiseled features framed by what the late Mr. Tynan described as a "black helmet" -- a shiny, bobbed haircut that gave her dark bangs a sharp, zig-zag line just above the eyebrows and an equally sharp set of scallops and spit curls at the earlobes, exposing a lovely, swan-like neck.

"Lulu" was her most indelible role -- the self-destructive protagonist of G.W. Pabst's "Pandora's Box." The movie was an eerily clinical depiction of the downfall of an alluring nymphomaniac attracted to erotic sensation and oblivion like a moth to a flame.

It was Miss Brooks' utterly natural ability to incarnate an illusion of all-consuming passion beneath a trimly passive exterior that evidently attracted Mr. Pabst. According to Mr. Tynan, she had inspired the 1920s comic-strip character Dixie Dugan, whose motto was "to be cool and look hot."

Miss Brooks was born in Cherryville, Kan., and raised in Wichita, Kan. Her father was an attorney and her mother a talented pianist who encouraged the child to take dancing lessons.

In 1922, Miss Brooks was allowed to travel to New York to participate in a summer course offered by the innovative dance company founded by Ruth St. Denis and Ted Shawn. Admitted to the company, she toured with the Denishawn Dancers for two years before tiring of balletic discipline and trying her luck as a showgirl. She landed jobs in George White's "Scandals" and the 1925 "Ziegfeld Follies," also attracting a bevy of playboy suitors and film contract offers from Metro-Goldwyn-Mayer and Paramount.

She accepted the latter, by her own testimony in a moment of impulsive contrariness that may have been unwise: Walter Wanger, her lover at the time, advised her to sign with MGM, because he was a Paramount executive and felt it might compromise her reputation to favor his company. Irritated by this reasoning, she signed with Paramount.

Between 1925 and 1929, Miss Brooks made 14 films at Paramount, appearing for the most part as vivacious shopgirls and frequently as foils for comedians like W.C. Fields and Ford Sterling.

Briefly married to the film director Edward Sutherland, she began a seven-year romantic liaison in 1927 with George Preston Marshall, the laundry magnate who became the first owner of the Washington Redskins. Partly on his advice, she spurned a renewal of her Paramount contract to accept Mr. Pabst's offer to appear in "Pandora's Box."

Although the movie, and its thematically similiar successor, "Diary of a Lost Girl," established Miss Brooks as a cult sensation with a European public, Hollywood tended to regard her as a prodigal ingrate. Her refusal to dub dialogue on a Paramount film originally shot silent, "The Canary Murder Case," led to an acrimonious break.

According to Miss Brooks, the studio planted an item to the effect that her speaking voice had proved unattractive in the transition from silents to talkies and this shibboleth hampered further career efforts. However, Miss Brooks also admitted to Mr. Tynan that the transition tended to cramp her private life.

"If you were to ask me what it was like to live in Hollywood in the twenties," she recalled, "I'd have to say that we were all . . . marvelously degenerate and happy . . . . The truth is that the coming of sound meant the end of the all-night parties. With talkies, you couldn't stay out till sunrise . . . . That was when the studio machine really took over."

Whatever the causes, Miss Brooks' career sputtered out in the early 1930s. Perceived by many as a potential rival to Garbo and Dietrich at the age of 23, she had become a Hollywood has-been before reaching 30.

After playing minor roles and appearing in a New York dance act, she gradually drifted into "the only well-paying career open to me as an unsuccessful actress of 36 . . . that of a call girl. I blacked out my past, refused to see my few remaining friends connected with the movies and began to flirt with fancies related to little bottles filled with yellow sleeping pills."

She also became an alcoholic. She lived in obscurity until 1955, when James Card, the film curator at the Eastman House, located her and persuaded her to take up residence in Rochester. There Miss Brooks began to use the film archives and began writing about her life. Although she claimed to have destroyed an autobiographical manuscript, the recollections in "Lulu in Hollywood" are remarkably vivid and unsparing. They constitute an invaluable first-hand account of show business celebrity in the 1920s.

Miss Brooks's 1926 marriage to Mr. Sutherland ended in divorce in 1928. In 1933, she married Deering Davis, a Chicago socialite. They were divorced six months later.