The error message:

 

Solution:

Refer below picture, go to the SQL data folder(eg.C:\Program Files\Microsoft SQL Server\MSSQL10_50.QNEBSS\MSSQL\DATA) properties, under General>Advanced, untick "Compress contents to save disk space", OK. Then user can try to create or restore database.