That depends on your definition of "compact'. There have been a few pistol sized handguns (as opposed to submachine gun sized) that were capable of select fire. There are very rare in the US, since a LEGAL full auto firearm must have been registered with the BATFE by May 1986, and none can be added to the registry after that date.
The H&K VP-70 could be fired semi auto or 3 rd burst. The Czechs made a very small machine pistol (the Skorpion) and certain Glock pistols could be fitted for full auto fire. Even the venerable Broomhandle Mauser pistol was available in a Schnellfuer (select fire semi or full) version. However, frankly, a full auto pistol without a shoulder stock is, IMHO, about as useful as a screen door in a submarine.