A recent classified ad in an East German newspaper offered this deal: "Prepared to exchange a luxury apartment in East Berlin for a hole in the wall."

True? As much as any of the hundreds of anecdotes in a newly released compilation entitled "The Jokes of Oppression: The Humor of Soviet Jews."Jews may not be free in the Soviet Union, but the Jewish joke is it doesn't fear jails or labor camps, escapes detection by the KGB, targets sacred institutions and venerated leaders and permeates every nook of society.

"In the absence of an open press in this kind of claustrophobic, stifled society, where publicly people wear one kind of face and privately an entirely different type, these jokes are of great significance," says the book's co-author, David Harris.

Harris, the Washington representative of The American Jewish Committee, spent 10 years collecting the jokes from Jews living in the Soviet Union, Israel, the United States and Europe. His co-author, Izrail Rabinovich, is a Soviet emigre who teaches at the Defense Language Institute in Monterey, Calif.

This joke illustrates frustration with repeated rejections of emigration requests:

A Jew named Khaimovich is turned down for an exit visa because he is in possession of state secrets from his place of work. "State secrets? You must be kidding. In my field the Americans are at least 20 years ahead of us," he exclaims. "That's precisely the secret," comes the curt reply.

The jokes, say the authors, are also embraced widely by non-Jews who identify with the recurring themes of a hostile bureaucracy, discontent with the standard of living, memories of Stalinist terror and frustration with the stifling presence of the Communist Party.

For instance, the same Khaimovich is being chastised at a district party meeting. "Why weren't you at the last party meeting?" asks an official. "If I had known it was the last, not only would I have come, but I'd have brought my entire family as well," he replies.

Or this one: "What's the difference between Catholicism and Communism?" The answer: "In Catholicism there's life after death. In Communism there is posthumous rehabilitation."

While the humor of other countries doesn't always travel well, laughter about the Soviet Union is usually culturally translatable in the United States. President Reagan enjoys telling jokes about the Russians, and he trots them out periodically at summit meetings with Soviet leaders.