How to access static resources from Apex, Visualforce and Custom Button

In Apex

Normal file (with soql)

Normal file (with PageReference.getContent)

Zip file (with PageReference.getContent)

※Zip file can not be accessed by soql.

In VF

Normal file

Zip file

In Custom Button