I think it will give you a better understanding about where I'm coming from by letting you know how I understand how Btree indices work fundamentally. I'm not a DBA and I'm asking this question as a layman with basic understanding of data structures.
The basic idea of an index is that it speeds up searches by skipping significant amount of records when searching through a database.
AFAIK, binary tree data structure, which I presume where Btree indices are based on, helps us to search without scanning the entire database by dividing the data into nodes. For oversimplified example, words that start from A to M are stored in left node, and words that start with N to Z are stored in right node on the first level of the tree. In this case when we search for the word "Jackfruit" it will only search on the left node skipping the right node saving us significant amount of time and IO.
In this sense, how does a bitmap index let us not scan the entire database when searching? If not, how does it speed up searches? Or is it just meant for compression?
Image taken from here
The image above is a conceptual illustration of a bitmap. Using that structure, how does a DB find rows? Does it scan all rows? In binary tree, that fact that you don't have to scan everything is exactly how it helps speed up the search. I can't see any explanation how exactly a DB gets an advantage in searching for rows using bitmap other than the fact that bitmap takes less space.
Btree indexes are good for key searching (duplicates allowed, but mainly distinct values in the column, ie. SSN). Bitmap indexes are better in cases when you have a few distinct values like 'sex', 'state', 'color', and so on.