What does it mean?
A joke built on two meanings of "outside of". First it means "apart from" (a book is the best friend after a dog), then it is taken literally: you can't read inside a dog.
Who said it?
Groucho Marx: American comedian and actor (1890–1977).
These exact words are widely credited to Groucho Marx, but they don’t appear in their known work. They may be a later paraphrase or a misattribution.