WASHINGTON — The disclosure that classified documents were found in a private office that Joseph R. Biden Jr. had used before beginning his 2020 campaign and at his residence in Wilmington, Del., has prompted comparisons to former President Donald J. Trump’s hoarding of sensitive government records, which is the subject of a criminal investigation.

Based on what is publicly known so far, here is a closer look:

At a basic level, both involve official files bearing classification markings that improperly accompanied Mr. Trump and Mr. Biden after they left office. Under the Presidential Records Act, White House records are supposed to go to the National Archives and Records Administration once an administration departs. Private citizens generally lack authorization to hold classified documents, and regulations require such files to be stored securely.

Special counsels — a type of prosecutor appointed to run sensitive investigations with some independence from day-to-day Justice Department control — are now scrutinizing both situations. In Mr. Trump’s case, Attorney General Merrick B. Garland appointed a special counsel, Jack Smith, in November. On Thursday, Mr. Garland named Robert K. Hur, a former Trump-appointed U.S. attorney, as special counsel for the Biden investigation.

There are key gaps in the public record about both, but the available information suggests there were significant differences in how the documents came to light, their volume and — most important — how Mr. Trump and Mr. Biden responded.

Mr. Trump and his aides resisted the government’s repeated efforts to retrieve them all. Mr. Biden’s lawyers reported the problem, and the White House says it has fully cooperated.

These apparent differences have significant legal implications.

In Mr. Trump’s case, several hundred government files marked as classified — along with thousands of unclassified documents and photos — ended up at his Florida club and residence, Mar-a-Lago, after he left office. Some were in cartons in a locked storage closet, and the F.B.I. discovered others in Mr. Trump’s office, including in his desk, according to court filings.

In Mr. Biden’s case, what the administration has described as “a small number of documents with classified markings” were found in a locked closet in an office at a Washington think tank, the Penn Biden Center for Diplomacy and Global Engagement. Mr. Biden had periodically used the space after leaving the vice presidency in 2017 and before he began his presidential campaign.

A subsequent search of Mr. Biden’s house in Wilmington, Del., turned up another batch in what the White House said was a storage space in the garage, as well as a one-page document “among stored materials in an adjacent room.”

As president, Mr. Trump is said to have periodically taken records from the Oval Office to the residential areas of the White House. During the chaos of his last days in office after he sought to cling to power, those files were apparently packed up with personal items like clothing and mementos and shipped to Mar-a-Lago.

It is not yet publicly known how records from the Obama administration wound up at the Penn Biden Center and Mr. Biden’s house, but the White House has suggested that boxes of files may have been shipped to both locations “in the course of the 2017 transition.” (It has also said, however, that Mr. Biden only began using the think tank office in “mid-2017.”)

On Tuesday, Mr. Biden said that he took classified information seriously and that he was “surprised to learn that there were any government records there that were taken to that office.”

Very differently.

In the case of Mr. Trump, the National Archives realized in the spring of 2021 that historically prominent files were missing and asked Mr. Trump to return them. The agency eventually retrieved 15 boxes and found that they included documents with classification markings. The Justice Department retrieved additional records after issuing a subpoena.

While a representative for Mr. Trump falsely told the department in June that they had fully complied with the subpoena, law enforcement officials obtained evidence that Mr. Trump still had more, and a court authorized an F.B.I. search in August to retrieve them.

In the case of Mr. Biden, the White House has said that his lawyers discovered the files on Nov. 2 when they were packing up to vacate the office at the Penn Biden Center. “The documents were not the subject of any previous request or inquiry by the archives,” it said.

Mr. Biden’s team subsequently searched two other places where the White House has said materials from his vice-presidential office might have been shipped after the Obama administration departed: his home in Wilmington and another in Rehoboth Beach, Del. No documents were found in Rehoboth Beach.

The White House acknowledged that Mr. Biden’s team had found the files stored at the Wilmington house and said it had reported the discovery “immediately,” but did not say when that was. In announcing his appointment of Mr. Hur, Mr. Garland said that Mr. Biden’s team had reported finding most of the documents on Dec. 20, and reported finding an additional one on the morning of Jan. 12.

Very differently.

Mr. Biden’s team reported the problem to the National Archives on the same day the first batch was discovered, and the agency retrieved the materials the next morning, the administration said. It emphasized that Mr. Biden’s team had since cooperated with the archives and the Justice Department, including by searching his two houses, “to ensure that any Obama-Biden administration records are appropriately in the possession of the archives.”

Mr. Biden said on Tuesday that his lawyers had acted appropriately: They immediately called the archives to turn over the materials. “We’re cooperating fully — cooperating fully — with the review, which I hope will be completed soon,” he said.

By contrast, Mr. Trump and his aides delayed responding to the National Archives’ repeated requests for months, then failed to fully comply with the subpoena while falsely saying they had. A court filing also suggested that security camera footage showed that “government records were likely concealed and removed” from the storage room at Mar-a-Lago after the subpoena.

Mr. Trump has repeatedly attacked the National Archives for telling the Justice Department about the matter and portrayed the investigation as illegitimate. A federal judge is considering holding his team in contempt for defying the subpoena.

Probably.

Mr. Trump publicly claimed that before leaving office, he declassified everything that turned up at Mar-a-Lago. No credible evidence has emerged to support that claim, and his lawyers have resisted repeating it in court, where there are professional consequences for lying. (Moreover, the potential crimes cited in the affidavit used to search Mr. Trump’s Florida residence do not depend on whether mishandled documents were classified.)

While the executive order governing the classified information system gives vice presidents the same power to declassify secrets as presidents wield, Mr. Biden has not claimed he declassified the materials found in the Penn Biden Center closet. He said on Tuesday that he did not know what they were.

Many more classified documents appear to have been improperly stored at Mr. Trump’s estate than at Mr. Biden’s office.

Court filings say that 184 documents marked as classified were in the 15 boxes the National Archives initially retrieved from Mar-a-Lago. The Trump team turned over 38 more such records after the subpoena, and the F.B.I. found another 103 in its search.

The Biden administration’s initial statement said a “small number” of documents marked as classified had been discovered in the closet at the Penn Biden Center. CBS News has reported there were about 10. The administration’s statement on Thursday about the second batch found at his house in Wilmington similarly described it as “a small number.”

Mr. Trump appears to have destroyed official documents. Former aides have said he ripped up files while in office, and a letter from the National Archives indicated that some of the files it retrieved had been mutilated.

There has been no allegation that Mr. Biden destroyed public records.

The implications of these differences are significant, though more information could still come to light.

One question is whether any mishandling of secrets was intentional. A provision of the Espionage Act, for example, makes it a crime if someone, without authorization, willfully retains a national security secret “and fails to deliver it on demand” to an official entitled to take custody of it.

Another provision of the act says that a person can be guilty if, through “gross negligence,” he or she permits national security papers to be removed from their proper place of custody. That provision has historically been interpreted in case law and Justice Department practice as requiring a state of mind that is so reckless that it falls just short of being willful.

The application to search Mar-a-Lago cited the Espionage Act, as well as laws against destroying official documents and obstructing an official effort. That the F.B.I. discovered additional documents with classification markings in its search of Mar-a-Lago has also raised the possibility that Mr. Trump’s team defied the subpoena and made false statements.