Along with the funds to keep the government running for the rest of the year, Congress has approved an almost total overhaul of the statutes that apply to federal crimes.

The package tries to tackle some problems that have plagued the criminal justice system for more than a decade: crimes by persons on parole or free on bail, unpredictable sentencing by judges, and offenses by hardened "career" criminals.

But the package of 23 anticrime measures also takes on some new problems: the increase in terrorism, credit card fraud, narcotics trafficking and high-tech computer crimes.

The changes do not apply, however, to state and local laws.

The legislation became a potentially sharp campaign issue after it stalled in the House Judiciary Committee. House Republicans succeeded in attaching it to the spending bill last week, setting up a political test for members who could face charges of being "soft on crime" as they head into the final days of their reelection drives.

The changes include the nation's first peacetime "preventive detention" bill, allowing judges to jail criminal suspects before trial if they are deemed dangerous to the community. They also would severely restrict use of the insanity defense, which came under fire after John W. Hinckley Jr. was found not guilty by reason of insanity of shooting President Reagan in 1981.

Those two provisions, in particular, sparked criticism from groups such as the American Civil Liberties Union. Executive director Ira Glasser said, "It is fraudulent to claim that these measures, which undermine fundamental constitutional liberties, will reduce violent crime or make this a safer society."

Overall, the package amounts to a major curtailment of defendant's rights in terms of sentencing, parole and bail. It also shifts some emphasis to victims of crime with the creation of a new federal victims compensation fund.

Attorney General William French Smith yesterday called the legislation "the most far-reaching and substantial reform of the criminal justice system in our history." He added, "It profoundly readjusts the balance between the forces of law and the forces of lawlessness."

Here are some key components of the package:

*Bail. Judges will be allowed to consider "danger to the community" in setting bail, and could decide to deny bail for a defendant. Currently, courts must set bail for any defendent who is expected to show up for trial.

*Sentencing. A presidentially appointed seven-member commission will be established to set up a standardized sentencing system. This follows a pattern already set by a number of states, including Maryland, which gives sentencing guidelines to judges and then forces the judge to explain in writing anytime he wants to deviate from the guidelines.

Parole will be abolished for federal crimes, but sentences can be reduced by 15 percent for good behavior.

*Forfeiture. It will be easier for law enforcement authorities to seize the profits and proceeds of persons convicted of organized crime activities and to seize land used to grow and store dangerous drugs.

*Labor racketeering. Violations of the Taft-Hartley Act involving labor bribery and payoffs will be treated as felonies instead of misdemeanors.

*Violent crime. The legislation sets a mandatory sentence of at least five years in prison for using a firearm in a federal crime of violence. It also creates a new category of crime -- crimes against family members of federal officials -- and some contract murders would become federal crimes.

*Terrorism. The bill sets tough federal penalties for destruction of aircraft and activities that endanger aircraft.

*Miscellany. One provision strengthens laws against counterfeiting trademarked products. Another creates a federal "drug czar" to oversee the war on illicit narcotics. And a controversial computer disclosure provision makes it a crime for unauthorized persons to disclose information stored on the federal government's computers.