When you compress a table or an index, you should be aware of two side effects:
o With ONLINE set to OFF, the nonclustered indexes are rebuilt one by one.
o With ONLINE set to ON, all the nonclustered indexes are rebuilt simultaneously.
You must account for the workspace required to rebuild the nonclustered indexes, because the space for the uncompressed heap is not released until the rebuild of the nonclustered indexes is complete.