Tool for decompiling and anti-decompiling deqbsp3 will decompile Quake 2 .bsp files (although I've purposely limited the program), and antidbsp will process a Quake 2 .bsp and prevent .bsp decompilers from making a good .map file (changes texture information). Both programs come with full source for educational purposes and can be found here.